bld extension to perform static code analysis with PMD https://github.com/rife2/bld-pmd
Find a file
2023-08-17 12:47:26 -07:00
.github/workflows Added github workflows 2023-04-14 09:13:14 -07:00
.idea Added JaCoCo extension 2023-08-13 19:52:59 -07:00
.vscode Updated dependencies 2023-06-26 16:41:19 -07:00
lib/bld Update bld-wrapper.properties 2023-08-17 12:47:26 -07:00
src Added install instruction reference 2023-08-16 08:39:52 -07:00
.gitignore Added publishing info 2023-04-15 09:06:16 -07:00
bld Initial commit 2023-04-14 06:02:38 -07:00
bld.bat Initial commit 2023-04-14 06:02:38 -07:00
LICENSE.txt Initial commit 2023-04-14 06:02:38 -07:00
README.md Added bld badge 2023-08-16 14:15:14 -07:00

Bld Extension to Perform Static Code Analysis with PMD

License Java bld Release Snapshot GitHub CI

To install, please refer to the extensions documentation.

To check all source code using the java quickstart rule, add the following to your build file

@BuildCommand
public void pmd() throws Exception {
    new PmdOperation()
        .fromProject(this)
        .execute();
}
./bld pmd test

To check the main source directory using a custom rule, java error prone rule and failing on any violation.

@BuildCommand
public void pmdMain() throws Exception {
    new PmdOperation()
            .fromProject(this)
            .failOnViolation(true)
            .inputPaths(this.srcMainDirectory().toPath())
            .ruleSets("config/pmd.xml", "category/java/errorprone.xml")
            .execute();
}
./bld compile pmdMain

Please check the PmdOperation documentation for all available configuration options.