ruff/crates/ty_project/src
Brent Westbrook aee9350df1
[ty] Add GitLab output format (#20155)
## Summary

This wires up the GitLab output format moved into `ruff_db` in
https://github.com/astral-sh/ruff/pull/20117 to the ty CLI.

While I was here, I made one unrelated change to the CLI docs. Clap was
rendering the escapes around the `\[default\]` brackets for the `full`
output, so I just switched those to parentheses:

```
--output-format <OUTPUT_FORMAT>
    The format to use for printing diagnostic messages

    Possible values:
    - full:    Print diagnostics verbosely, with context and helpful hints \[default\]
    - concise: Print diagnostics concisely, one per line
    - gitlab:  Print diagnostics in the JSON format expected by GitLab Code Quality reports
```

## Test Plan

New CLI test, and a manual test with `--config 'terminal.output-format =
"gitlab"'` to make sure this works as a configuration option too. I also
tried piping the output through jq to make sure it's at least valid JSON
2025-09-03 09:08:12 -04:00
..
db [ty] Add caching for submodule completion suggestions (#19408) 2025-07-18 11:54:27 -04:00
glob [ty] Track heap usage of salsa structs (#19790) 2025-08-12 13:28:44 +02:00
metadata [ty] Add GitLab output format (#20155) 2025-09-03 09:08:12 -04:00
watch [ty] Disallow std::env and io methods in most ty crates (#20046) 2025-08-22 11:13:47 -07:00
db.rs [ty] Remove duplicate global lint registry (#20053) 2025-08-22 19:43:12 -04:00
files.rs [ty] Track heap usage of salsa structs (#19790) 2025-08-12 13:28:44 +02:00
glob.rs [ty] Track heap usage of salsa structs (#19790) 2025-08-12 13:28:44 +02:00
lib.rs [ty] Remove duplicate global lint registry (#20053) 2025-08-22 19:43:12 -04:00
metadata.rs [ty] Track heap usage of salsa structs (#19790) 2025-08-12 13:28:44 +02:00
walk.rs [ty] Speedup project file discovery (#19913) 2025-08-14 19:38:39 +01:00
watch.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00