[Yanel-dev] cleanup comments

Alec Bickerton alec.bickerton at wyona.com
Wed Dec 10 10:11:20 CET 2008


Gary Jones wrote:
> Guillaume Déflache <guillaume.deflache at wyona.com> writes:
> 
>> Also an unrelated question: I always use curly braces for if and else
>> branches,
> 
> If only everyone was so well behaved ;-)
> 
>> except for guards like:
>> if (log.isDebugEnabled()) log.debug("foo: ", foo);
>> ...and I am tempted to do that for early returns as well, always keeping
>> everything on the same line to avoid mistakes.
>> Can we tolerate these exceptions without bothering anyone and some
>> static code checker?
> 
> You can suppress PMD warnings as described at
> http://pmd.sourceforge.net/suppressing.html but of course other tools
> have different ways of doing it, if they have any way at all. I'm not
> sure what Alec used to decide on his patch contents, probably PMD, but
> I'm not sure.

> @Alec: if you did run PMD, did you also try the copy/paste detector?

I've not tried the copy paste detector. FYI, the patch was created using
 only eclipse. I figured that going over the code with an unrealistic
ruleset on the first pass might be a bit extreme.

PMD is available, but at the moment, there are so many issues that the
results are less useful. Perhaps once the easy things are done then we
should go into more detail with PMD/FindBugs et al.

I was going to attach my compiler settings as a help, but it appears to
be non-trivial to do so at the moment.

Alec,


More information about the Yanel-development mailing list