ruff/crates
Brent Westbrook ac5488086f
[ty] Add GitHub output format (#20358)
## Summary

This PR wires up the GitHub output format moved to `ruff_db` in #20320
to the ty CLI.

It's a bit smaller than the GitLab version (#20155) because some of the
helpers were already in place, but I did factor out a few
`DisplayDiagnosticConfig` constructor calls in Ruff. I also exposed the
`GithubRenderer` and a wrapper `DisplayGithubDiagnostics` type because
we needed a way to configure the program name displayed in the GitHub
diagnostics. This was previously hard-coded to `Ruff`:

<img width="675" height="247" alt="image"
src="https://github.com/user-attachments/assets/592da860-d2f5-4abd-bc5a-66071d742509"
/>

Another option would be to drop the program name in the output format,
but I think it can be helpful in workflows with multiple programs
emitting annotations (such as Ruff and ty!)

## Test Plan

New CLI test, and a manual test with `--config 'terminal.output-format =
"github"'`
2025-09-17 09:50:25 -04:00
..
ruff [ty] Add GitHub output format (#20358) 2025-09-17 09:50:25 -04:00
ruff_annotate_snippets
ruff_benchmark Revert "[ruff]: Build loongarch64 binaries in CI (#20361)" (#20372) 2025-09-12 17:21:04 -04:00
ruff_cache
ruff_db [ty] Add GitHub output format (#20358) 2025-09-17 09:50:25 -04:00
ruff_dev
ruff_diagnostics
ruff_formatter Add support for using uv as an alternative formatter backend (#19665) 2025-09-09 20:39:53 +05:30
ruff_graph
ruff_index
ruff_linter [syntax-errors]: import from * only allowed at module scope (F406) (#20166) 2025-09-16 15:53:28 -04:00
ruff_macros
ruff_memory_usage
ruff_notebook
ruff_options_metadata
ruff_python_ast Track t-strings and f-strings for token-based rules and suppression comments (#20357) 2025-09-12 13:00:12 -05:00
ruff_python_ast_integration_tests
ruff_python_codegen Expose Indentation in ruff_python_codegen (#20216) 2025-09-03 13:32:31 -04:00
ruff_python_formatter Add support for using uv as an alternative formatter backend (#19665) 2025-09-09 20:39:53 +05:30
ruff_python_index Track t-strings and f-strings for token-based rules and suppression comments (#20357) 2025-09-12 13:00:12 -05:00
ruff_python_literal
ruff_python_parser [syntax-errors]: import from * only allowed at module scope (F406) (#20166) 2025-09-16 15:53:28 -04:00
ruff_python_semantic [ruff] Allow dataclass attribute value instantiation from nested frozen dataclass (RUF009) (#20352) 2025-09-12 16:46:49 -04:00
ruff_python_stdlib
ruff_python_trivia
ruff_python_trivia_integration_tests
ruff_server Remove Diagnostic::expect_range and all consumers (#20322) 2025-09-10 17:19:20 -07:00
ruff_source_file
ruff_text_size
ruff_wasm [playground] Enable inline noqa for multiline strings in playground (#20442) 2025-09-17 09:29:40 +02:00
ruff_workspace [ruff] Add analyze.string-imports-min-dots to settings documentation (#20375) 2025-09-16 13:19:34 +02:00
ty [ty] Add GitHub output format (#20358) 2025-09-17 09:50:25 -04:00
ty_combine
ty_ide [ty] Sync vendored typeshed stubs (#20394) 2025-09-15 09:30:28 +02:00
ty_project [ty] Add GitHub output format (#20358) 2025-09-17 09:50:25 -04:00
ty_python_semantic [ty] move graphql-core to good.txt (#20447) 2025-09-17 10:09:32 +02:00
ty_server Allow the if_not_else Clippy lint 2025-09-09 08:49:25 -04:00
ty_static
ty_test [ty] Add functions for revealing assignability/subtyping constraints (#20217) 2025-09-03 16:44:35 -04:00
ty_vendored [ty] More constraint set simplifications via simpler constraint representation (#20423) 2025-09-16 10:05:01 -04:00
ty_wasm [ty] Make auto-import completions opt-in via an experimental option 2025-09-03 09:57:26 -04:00