To check code against rules provided by PMD.
Sonar SonarQubeTM Java Plugin
- Install the PMD plugin through the Update Center (since Sonar 3.5) or download it into the SONAR_HOME/extensions/plugins directory from the Java Ecosystem page
- Restart the Sonar server
In the quality profile, activate some rules from PMD and run a Sonar an analysis on your project.