-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
GitHub actions output format #9443
Comments
Thank you for opening this issue, great suggestion ! |
If no one is working on this I can do it |
So I was checking the code and it seems like this could be done with --msg-template, in fact some reporters are marked as deprecated and suggest using --msg-template directly instead. Would this be the same case? |
I think trying if this works with a template would be nice. Then we can just document that in the documentation. You could start there? |
Once it works as template string, maybe it'd still be beneficial to have something like
and can instead simply go ahead and run
without having to know the "internals" of how the messages are to be outputted in order to be GitHub-action-consumable? But maybe that's just me being too lazy as a user. |
No I think that is fair. We have recently added a new I'm on mobile right now so can't easily link the PR myself, sorry! |
I also like the shortcut. Lazy users are the best users 😄 |
A new `github` reporter has been added. This reporter automatically annotates code on GitHub's UI with the messages found during linting. Closes pylint-dev#9443.
A new `github` reporter has been added. This reporter automatically annotates code on GitHub's UI with the messages found during linting. Closes pylint-dev#9443.
A new `github` reporter has been added. This reporter automatically annotates code on GitHub's UI with the messages found during linting. Closes pylint-dev#9443.
A new `github` reporter has been added. This reporter automatically annotates code on GitHub's UI with the messages found during linting. Closes pylint-dev#9443.
I made a dummy test with my PR changes: https://github.com/zoftko/balba/pull/2/files Just wondering if we should mark all annotations as error? Or make some sort of mapping between pylint message types and github annotation types. For example Pylint has fatal, error, warning, convention, refactor and information type messages. Github has notice, warning and error annotations. |
A new `github` reporter has been added. This reporter automatically annotates code on GitHub's UI with the messages found during linting. Closes pylint-dev#9443.
It looks really great. I think pylint fatal should break the build, error should be mapped to error, warning to warning and pylint convention and refactor to github's notice. |
A new `github` reporter has been added. This reporter automatically annotates code on GitHub's UI with the messages found during linting. Closes pylint-dev#9443.
A new `github` reporter has been added. This reporter automatically annotates code on GitHub's UI with the messages found during linting. Closes pylint-dev#9443.
A new `github` reporter has been added. This reporter automatically annotates code on GitHub's UI with the messages found during linting. Closes pylint-dev#9443.
* Add GitHub reporter A new `github` reporter has been added. This reporter automatically annotates code on GitHub's UI with the messages found during linting. Closes #9443. * Enable github output format for CI * Apply corrections Used message.C directly instead of slicing again, improved feature notes and removed unecessary output from locally run pre-commit pylint hook. It was kept for the manual stage since that is run on Github and needs it to annotate code on PRs.
@crazybolillo Many thanks for the quick implementation and thanks to everyone involved in the PR ❤ |
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:
You can use it like this:
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:
The text was updated successfully, but these errors were encountered: