Git Product home page Git Product logo

Comments (10)

crazybolillo avatar crazybolillo commented on June 24, 2024 2

If no one is working on this I can do it

from pylint.

Splines avatar Splines commented on June 24, 2024 1

I think trying if this works with a template would be nice. Then we can just document that in the documentation.

Once it works as template string, maybe it'd still be beneficial to have something like github available as key one can pass to the --output-format (or a similiar?) flag such that users won't have to add something like

pylint --msg-template='{msg_id}:{line:3d},{column}: {obj}: {msg}' # example from the docs

and can instead simply go ahead and run

pylint --output-format=github   # or a similar cli flag

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.

from pylint.

DanielNoord avatar DanielNoord commented on June 24, 2024 1

No I think that is fair. We have recently added a new json reporter. You can probably look at that PR to see what stuff you'd need to add for it to work.

I'm on mobile right now so can't easily link the PR myself, sorry!

from pylint.

crazybolillo avatar crazybolillo commented on June 24, 2024 1

I made a dummy test with my PR changes:

https://github.com/zoftko/balba/pull/2/files

Screenshot from 2024-03-05 19-42-03

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.

from pylint.

Pierre-Sassoulas avatar Pierre-Sassoulas commented on June 24, 2024

Thank you for opening this issue, great suggestion !

from pylint.

crazybolillo avatar crazybolillo commented on June 24, 2024

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?

from pylint.

DanielNoord avatar DanielNoord commented on June 24, 2024

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?

from pylint.

Pierre-Sassoulas avatar Pierre-Sassoulas commented on June 24, 2024

I also like the shortcut. Lazy users are the best users 😄
Here's hopefuly a link to the code of json reporters (other exemples are available in this directory) : https://github.com/pylint-dev/pylint/blob/main/pylint%2Freporters%2Fjson_reporter.py

from pylint.

Pierre-Sassoulas avatar Pierre-Sassoulas commented on June 24, 2024

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.

from pylint.

Splines avatar Splines commented on June 24, 2024

@crazybolillo Many thanks for the quick implementation and thanks to everyone involved in the PR ❤

from pylint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.