News for hackers. Stuff that matters.
Re:Disable comments make static analysis tools worse by armada651 on Tuesday July 06, 2021 @01:05AM (#27744417)
Sometimes static analysis tools have bugs and misunderstand what's happening in otherwise perfectly fine code. I think that's ultimately what disable comments are intended for.
Re:Disable comments make static analysis tools worse by jeffreygoesto on Tuesday July 06, 2021 @01:59AM (#27744657)
Yes, but not only. You can think of the rules as classifiers with non zero false positive rates. They were extracted by going backwards from errors that were made often. There may be some cases where you want to break the rule for a reason. Then you better document why, because that this reason still holds must ideally be reviewed with any relevant change.

And then there are rules that target i.e. portability and warn you that the code may easily break on change, although currently it is not broken.