pylint icon indicating copy to clipboard operation
pylint copied to clipboard

GitHub actions output format

Open Splines opened this issue 1 year ago • 0 comments

Current problem

GitHub actions/scripts can output a special log syntax to create warning/error messages directly in the GitHub UI. This is awesome, since you will see the warnings/errors in the summary of your last run and directly in the Files changed tab in pull requests (PRs). As an example, consider this image:

RuboCop (the linter/formatter for Ruby code) has an "GitHub Actions Formatter" directly included:

Useful for GitHub Actions. Formats offenses as workflow commands to create annotations in GitHub UI.

You can use it like this:

rubocop --format github

and everything is ready to go.

Desired solution

I've seen that Pylint allows to specify the --output-format command line flag and that a new JSON2 reporter was added recently. I wonder if there is also a GitHub reporter available. I haven't found one yet after some digging around in search engines ;)

Additional context

The feature could then be used as follows:

pylint --output-format=github

Splines avatar Feb 17 '24 08:02 Splines