bld extension to perform static code analysis with PMD https://github.com/rife2/bld-pmd
Find a file
2024-01-21 13:31:36 -08:00
.github/workflows Updated copyright 2023-08-28 14:52:13 -07:00
.idea Updated copyright 2024-01-21 13:24:39 -08:00
.vscode Updated dependencies 2023-06-26 16:41:19 -07:00
lib/bld Version 0.9.3 2023-10-22 14:51:01 -07:00
src Bumped dependencies 2024-01-21 13:24:59 -08: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 Minor clenaup 2024-01-21 13:31:36 -08: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(this.srcMainDirectory().toPath())
            .ruleSets("config/pmd.xml", "category/java/errorprone.xml")
            .execute();
}
./bld compile pmd-main

Please check the PmdOperation documentation for all available configuration options.