-
Notifications
You must be signed in to change notification settings - Fork 12
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
Useless suppression false positives #55
Comments
Hi @hmc-cs-mdrissi, thanks for the report. Do you have Since disables are only line scoped, I wouldn't want to prevent I'd suggest instead changing your message control settings to be |
I'd like to treat I don't have enable=all and instead have enable E,F + specific warnings/information messages. useless-suppression is one I want to use and current way pylint-protobuf disables no-member/similar errors means it produces a lot of useless-suppressions. I think my fix has no impact on users who don't use useless-suppression. For users who do use useless-suppression the status quo is pylint-protobuf will make false positive for most protobuf accesses currently. Disabling useless-suppression there can be wrong sometimes but I'd trade current high protobuf false positives with some protobuf false negatives. useless-suppression will still work as normal for places where pylint-protobuf doesn't use _disable_message and it's not a protobuf type. |
Since pylint checker priority was removed, pylint-protobuf no longer tries to suppress "no-member" via |
Summary
Enabling pylint-protobuf can lead to useless suppression triggering for places where it disables an error that it checks when pylint wouldn't have flagged it anyway. I'm mainly seeing this for no-member. I think fix would be every place that does self._disable should also disable useless-suppression. It may be enough to update here to also disable useless-suppresion too.
edit: I can confirm patching
_disable
to be,is enough to remove false positive.
The text was updated successfully, but these errors were encountered: