ruff/crates/ty/docs
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
..
.gitattributes [ty] Mark generated files as such in .gitattributes (#18195) 2025-05-19 16:50:48 +02:00
cli.md [ty] Add GitHub output format (#20358) 2025-09-17 09:50:25 -04:00
configuration.md [ty] Include python folder in environment.root if it exists (#20263) 2025-09-05 13:53:48 +02:00
environment.md [ty] validate constructor call of TypedDict (#19810) 2025-08-25 14:45:52 +02:00
mypy_primer.md [ty] Update mypy_primer doc (#18638) 2025-06-11 20:50:37 -07:00
rules.md [ty] Add backreferences to TypedDict items in diagnostics (#20262) 2025-09-05 12:38:37 +02:00
tracing-flamegraph.png Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
tracing.md [ty] Minor typo in environment variable name (#17848) 2025-05-05 10:25:48 +00:00