3 ms·
Sometimes static analysis tools have bugs and misunderstand what's happening in otherwise perfectly fine code. I think that's ultimately what disable comments a
by armada651 5y ago
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.
- jeffreygoesto 5y agoYes, 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.