ruff/crates/ty/tests/cli
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
..
config_option.rs [ty] Allow overriding rules for specific files (#18648) 2025-06-15 14:27:39 +01:00
exit_code.rs [ty] Split CLI tests into multiple files (#18537) 2025-06-07 16:43:28 +00:00
file_selection.rs [ty] resolve file symlinks in src walk (#19674) 2025-08-01 22:52:04 +02:00
main.rs [ty] Add GitLab output format (#20155) 2025-09-03 09:08:12 -04:00
python_environment.rs [ty] Add search paths info to unresolved import diagnostics (#20040) 2025-08-26 11:01:16 -04:00
rule_selection.rs [ty] Add search paths info to unresolved import diagnostics (#20040) 2025-08-26 11:01:16 -04:00