To install the latest version, add the following to the lib/bld/bld-wrapper.properties file:
bld.extension-pmd=com.uwyn.rife2:bld-pmdFor more information, please refer to the extensions documentation.
To check all source Codecode using the Java Quickstart configuration, add the following to your build file:
@BuildCommand(summary = "Checks source code with PMD")
public void pmd() throws Exception {
new PmdOperation()
.fromProject(this)
.execute();
}./bld pmd testTo check the main source directory using a custom ruleset, Java Error Prone configuration, and failing on any violation.
@BuildCommand(value = "pmd-main", summary = "Checks main source code with PMD")
public void pmdMain() throws Exception {
new PmdOperation()
.fromProject(this)
.failOnViolation(true)
.inputPaths(srcMainDirectory())
.ruleSets("config/pmd.xml", "category/java/errorprone.xml")
.execute();
}./bld compile pmd-mainPlease check the PmdOperation documentation for all available configuration options.