Skip to content

support CI-friendly formatted output #14962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
leifwalsh opened this issue Mar 27, 2023 · 2 comments
Closed

support CI-friendly formatted output #14962

leifwalsh opened this issue Mar 27, 2023 · 2 comments
Labels

Comments

@leifwalsh
Copy link

Feature

Several CI systems will do nice things with error output if they are formatted in a particular way. For example, ruff supports --format=github to format messages in a way such that the GitHub UI will display the errors in context inside the diff: https://beta.ruff.rs/docs/editor-integrations/#github-actions.

Other systems like GitLab and Azure DevOps also support specific output formats (which are different). ruff's implementation contains some links to the various formats that could be useful: https://github.com/charliermarsh/ruff/blob/31fff4b10ee6d17d9236cefac46fcf725001b2b9/crates/ruff_cli/src/printer.rs#L200

Could mypy also support output formats that integrate into common CI systems as well?

Pitch

This would make PRs easier to review when there are type errors, because rather than needing to read the CI job logs, you could just go into the diff view and see the errors directly in context within the files.

I would be happy to work on this if someone could point me to where in the mypy code the errors get formatted. I've got no experience with the mypy codebase though, so I'm not quite ready to dive in and propose a PR on my own.

@emmatyping
Copy link
Member

I think this is similar to #10816, I'll close this in favor of that (I think that issue has become "support more output formats")

@timj
Copy link

timj commented Sep 6, 2024

From what I can tell the issue referenced here has only tackled JSON format and is now closed without GitHub support. Can we reopen this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants