PMD, CheckStyle and FindBugs

Eclipse Plugins

PMD

Install

Update site : [http://pmd.sourceforge.net/eclipse|http://pmd.sourceforge.net/eclipse]

Install PMD for eclipse 3.

Configure

Go to : Windows > Preferences > PMD > Configuration des règles

Then remove all rules.

Then import rule set from : "quality" projet under "src/main/resources". The file to import is "pmd.xml". Import by reference.

Use it

On a file you could do a right click and then go to PMD > Check code with PMD.

A report is generated with all violations.

Before all commit : try to remove all priority 1 and 2 violations. If you could remove other violations quickly, do it. If you don't understand a rule, don't spend to much time on it and report it to the project owner.

For more information : go to [http://pmd.sourceforge.net/|http://pmd.sourceforge.net/].

CheckStyle

Install

Update site : [http://eclipse-cs.sf.net/update/|http://eclipse-cs.sf.net/update/]

Install Checkstyle plugin version 5.x and Migration plugin from 4.x to 5.x

Configure

Go to : Windows > Preferences > Checktyle

Then import the rule set file by clicking on "New...". The file is in the "quality" projet under "src/main/resources". The file to import is "checkstyle.xml".

Then chose it as default by clicking on the "Set as default" button.

Use it

By default, all projects are automaticaly checked. You could deactivate checkstyle on a project : select the project and right click on "Checkstyle > Deactivate Checkstyle".

You could activate checkstyle on demand by right clicking on the resource (a projet or a simple java file) you want to check and click on "Checkstyle > Check code with checkstyle".

A report is generated with all violations.

Before all commit : try to remove all errors and warnings. If you could remove other violations quickly, do it. If you don't understand a rule, don't spend to much time on it and report it to the project owner.

For more information : go to [http://eclipse-cs.sourceforge.net/|http://eclipse-cs.sourceforge.net/].

Findbugs

Install

Update site : [http://findbugs.cs.umd.edu/eclipse/|http://findbugs.cs.umd.edu/eclipse/]

Install Findbugs plugin.

Configure

Go to : Windows > Preferences > Java > Findbugs > Filter Files

Then import the rule set file by clicking on "Add..." button of the "Include filter files" section. The file is in the "quality" projet under "src/main/resources". The file to import is "findbug.xml".

Use it

You could launch findbugs on a project : select the project and right click on "Findbugs > Find Bugs".

A report is generated with all possible bugs.

Before all commit : try to remove all red bugs. If you could remove other bugs quickly, do it. If you don't understand a rule, don't spend to much time on it and report it to the project owner.

For more information : go to [http://findbugs.sourceforge.net/manual/eclipse.html|http://findbugs.sourceforge.net/manual/eclipse.html].

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.