Cool!

Now, probably it doesn't make sense to use both PMD and findbugs,
especially if we use annotations to suppress specific warnings. Do you
have an idea which one is better?

Andreas

On Sat, Mar 14, 2009 at 17:11, Hubert, Eric <eric.hub...@foxmobile.com> wrote:
> Hi Andreas,
>
>> Is it possible to tell Findbugs and/or PMD to ignore specific false
>> positives using annotations (either Javadoc style or Java 5)?
> Sorry, I completely forgot to answer this question. In addition to specifying 
> a specific ruleset it is possible to deactivate a rule in a specific context. 
> This should be accompanied with a comment, of course.
>
> As PMD works on the source code it is possible to use the normal 
> @SuppressWarnings annotation in the following format
> @SuppressWarnings("PMD.rulename")
>
> If you are working with Eclipse, you then have to ignore a warning of an 
> unknown suppression, or something like that (Eclipse compiler setting).
> PMD recognizes this suppression.
>
> Also see:
> http://pmd.sourceforge.net/suppressing.html
>
>
> For Findbugs this can obviously not work, as Findbugs operates on the 
> bytecode and the java.lang.SuppressWarnings annotation has source not runtime 
> rentention.
> Therefore Findbugs defines its own Annotation:
> @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="rulename")
>
> Also see:
> http://findbugs.sourceforge.net/manual/annotations.html
>
>
> Regards,
>  Eric
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@synapse.apache.org
For additional commands, e-mail: dev-h...@synapse.apache.org

Reply via email to