bld extension to perform static code analysis with PMD
https://github.com/rife2/bld-pmd
.github/workflows | ||
.idea | ||
.vscode | ||
lib/bld | ||
src | ||
.gitignore | ||
bld | ||
bld.bat | ||
LICENSE.txt | ||
README.md |
Bld Extension to Perform Static Code Analysis with PMD
To check all source code using the java quickstart rule.
@BuildCommand
public void pmd() throws Exception {
new PmdOperation
.fromProject(this)
.execute();
}
./bld pmd test
To check the main source code using a custom rule, java error prone rule and failing on any violation.
@BuildCommand
public void pmdMain() throws Exception {
new PmdOperation
.fromProject(this)
.failOnValidation(true)
.addInputPath(project.srcMainDirectory().toPath())
.addRuletSet("config/pmd.xml", "category/java/errorprone.xml");
.execute();
}
./dld compile pmdMain
Please check the PmdOperation documentation for all available configuration options.