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
--list-msgs and --list-msgs-enabled output different sets of messages #4778
Comments
The fix should be a refactor so we use the same list for both, which is not the case currently, one is handled in def cb_list_messages(self, option, optname, value, parser):
"""optik callback for printing available messages"""
self.linter.msgs_store.list_messages()
sys.exit(0)
def cb_list_messages_enabled(self, option, optname, value, parser):
"""optik callback for printing available messages"""
self.linter.list_messages_enabled()
sys.exit(0) |
I investigated and this is due to |
Well, now that you say it, the fix seems to be a better documentation of what list-msgs-enabled is doing compared to list-msg. It seems to me that this is working as intended, if the message cannot be emitted for this python interpreter it's not "enabled". What do you think @scop ? |
I do find the described behavior surprising. The way I'd personally like to see the options behave would be to make |
Yes the name is not clear in itself. |
Both options now show which messages can't be emitted with the current interpreter. This makes function more like their name implies. This closes pylint-dev#4778
* Refactor ``--list-msgs`` & ``--list-msgs-enabled`` Both options now show which messages can't be emitted with the current interpreter. This makes function more like their name implies. This closes #4778 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Bug description
Configuration
Command used
Pylint output
Expected behavior
No difference, same (complete) set of message ids output from both.
Pylint version
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: