ruff/crates/ty/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
..
args.rs [ty] Add GitLab output format (#20155) 2025-09-03 09:08:12 -04:00
lib.rs [ty] Add GitLab output format (#20155) 2025-09-03 09:08:12 -04:00
logging.rs [ty] Allow -qq for silent output mode (#19366) 2025-07-15 17:08:19 +00:00
main.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
printer.rs [ty] clear the terminal screen in watch mode (#19712) 2025-08-04 13:45:37 +02:00
python_version.rs
version.rs Display ty version for ty --version and ty -V (#17888) 2025-05-06 08:06:41 -05:00