Such tools seem particularly useful as an adjunct to, but not a
substitute for, peer review. I'm always disappointed when someone
thinks they can cut corners by putting such a tool in the build system,
instead of educating developers.
+1.
I've seen tools like this used as "feel-good" CI plugins more often than
not. If that's all they are used for then they're not much good. As you
suggest, if used with good code reviews, *and* the rules used by the
tools are also reviewed and agreed ahead of time, then they are
certainly helpful.
I'm not talking about purely styles rules here. Granted, there are
supposedly grey areas as to what's style and what's not. E.g. do we
always use braces with single statements associated with looping
constructs and conditionals, or not: I consider this to be a maintenance
bug and hence not style - I think it's almost always possible to
determine whether something is merely style, or more serious.
"A Comparison of Bug Finding Tools for Java," which compares several
related tools, offers a useful perspective.
<
http://www.cs.umd.edu/~jfoster/papers/issre04.pdf>
Decent read. I agree with the view that if you're going to use tools
like this at all, use at least a couple and compare/collate the findings.
AHS