News for hackers. Stuff that matters.
Re:Disable comments make static analysis tools worse by EdwardDiego on Tuesday July 06, 2021 @04:24AM (#27745507)
Aye - on my current (Java) project, my general rule of thumb is if I'm suppressing a compiler/IDE warning or codestyle rule, I comment as to why.

E.g., am I suppressing raw-types warning because I couldn't be arsed getting the type signatures right? Or because some library we're using only accepts a `List<Future>` when every other usage of `Future` in the method is a `Future<T>`, so you need to use a raw `List` at some point?

I try to suppress as few warnings as possible, so only suppress warnings that are due to third party limitations like the above, or because I think that the warning is, in this instance, not helpful if obeyed.

But once again, I'll always comment to explain this _why_

There are no comments on this comment yet.