Skip to content
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

RFE: possibility to change category of a message in config #3251

Closed
scop opened this issue Nov 17, 2019 · 4 comments
Closed

RFE: possibility to change category of a message in config #3251

scop opened this issue Nov 17, 2019 · 4 comments

Comments

@scop
Copy link
Contributor

scop commented Nov 17, 2019

Is your feature request related to a problem? Please describe

As discussed in #3250, an option to change the category of a message would be useful.

My first use case would be to exit with a nonzero status if some (currently) informational messages are emitted, e.g. useless-suppression and use-symbolic-message-instead.

A secondary use case I can think of would be to lower the severity of a warning or an error message to informational. The difference of this compared to disabling messages is that the messages would be displayed in the output, but not cause a nonzero exit.

Describe the solution you'd like

Configurabie categories/severity levels for messages, including their effect on the exit status.

Additional context

I gather the categories are currently kind of hardwired to the messages identifiers, so maybe it would be good to not change them but just their "effect" so there's no confusion about what is being referred to in online discussions etc.

@daoiqi
Copy link

daoiqi commented Apr 2, 2020

Yes, In something I want to change message level to warning. so I can get precise evaluation score

b = 1,

R1707: Disallow trailing comma tuple (trailing-comma-tuple)

@Pierre-Sassoulas
Copy link
Member

I'm going to close as won't fix because the change would be humongous and would yield strange results like the msgid not matching the actual reported category. Also it's possible to deal with this with a combination of disable / enable and it's now possible to exit with an error code for informational messages.

@Pierre-Sassoulas Pierre-Sassoulas added Won't fix/not planned and removed Enhancement ✨ Improvement to a component labels Jun 30, 2022
@scop
Copy link
Contributor Author

scop commented Jun 30, 2022

and it's now possible to exit with an error code for informational messages.

Interesting, I have missed this. I assume you mean fail-on=I?

@Pierre-Sassoulas
Copy link
Member

Pierre-Sassoulas commented Jun 30, 2022

I assume you mean fail-on=I?

Yes, exactly. Available for pylint above 2.9.0

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

No branches or pull requests

4 participants