pylint's return code is still 0 when analysed code contains useless-suppressions #4296
Labels
Bug 🪲
Good first issue
Friendly and approachable by new contributors
Help wanted 🙏
Outside help would be appreciated, good for new contributors
Milestone
Steps to reproduce
Given a file
a.py
:Current behavior
Result of
pylint a.py --disable=all --enable=useless-suppression
:however the return code of this is command
0
. This makes it much more difficult create CI/CD pipelines that check whether there are unneeded suppressions, for example.This appears to be because of the fact that even though a message is added to the reporter, the MSG_TYPES_STATUS of info messages is 0. Hence when this message is parsed, msg_status is or'ed with 0 and so the return code of the command is still 0.
Expected behavior
The return code should be non-zero since a check which was enabled has failed.
There are a number of different ways to achieve this including:
MSG_TYPES_STATUS['I']
to a non-zero number so that raising anyinfo
messages results in a non-zero exit codeuseless-suppression
from typeinfo
to be typewarning
pylint --version output
Result of
pylint --version
output:The text was updated successfully, but these errors were encountered: