bld extension to perform static code analysis with PMD https://github.com/rife2/bld-pmd
Find a file
2024-06-27 21:26:03 -07:00
.github/workflows Bumped workflows actions to the latest versions 2024-04-26 01:34:57 -07:00
.idea Replaced List with Collection whenever applicable. 2024-06-22 14:50:37 -07:00
.vscode Bumped bld to version 1.9.1 2024-05-09 21:21:40 -07:00
config Replaced List with Collection whenever applicable. 2024-06-22 14:50:37 -07:00
lib/bld Removed JaCoCo extension 2024-06-22 11:07:02 -07:00
src Version 1.1.1 2024-06-27 21:26:03 -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 Replaced List with Collection whenever applicable. 2024-06-22 14:50:37 -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 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 test

To 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-main

Please check the PmdOperation documentation for all available configuration options.