Helping to find the usefulness of a proposal
rssh at gradsoft.com.ua
rssh at gradsoft.com.ua
Thu Apr 2 05:56:20 PDT 2009
> This would be useful.
>
> One might be able to start by building on the infrastructure in
> Checkstyle, PMD or FindBugs for some of these. I don't know about
> FindBugs, but the other two allow you to write your own matching
> rules. Jackpot could be used as well, but it's no longer maintained as
> an independent project (now part of NB refactoring infrastructure).
> One would have to use a slightly older version of it.
>
<shameless plug>
With JavaChecker infrastructure
(http://redmine.gradsoft.ua/projects/show/javachecker) it's easy to write
declarative rules for counting source-code patterns. For example, rule
for catching exception with empty catch block look's like:
catch($x,Block(NIL)) -> true
[ violationDiscovered(EmptyCatchBlock,
"empty catch block",$x) ].
And as I know, this is one tool, which contains own Java resolver.
(jackport can use javacc resolver, CheckStyle and PMD does not have
resolvers yet; FindBugs work with .class files, so it can check only
compiled stuff).
But I will have time to write rules only during next week-end;
if anybody want to write this rules earlier - I recommend use JavaChecker
as starting point
Reading sources and some introductory article: (for example
http://www.gradsoft.ua/eng/whitepapers/secr2008/secr2008-1.html) must be
enough for starting hacking.
</shameless plug>
>
>
> Patrick
>
>
More information about the coin-dev
mailing list