bld extension to perform static code analysis with PMD https://github.com/rife2/bld-pmd
Find a file
2023-04-14 18:26:25 -07:00
.github/workflows Added github workflows 2023-04-14 09:13:14 -07:00
.idea More javadocs and tests 2023-04-14 08:42:37 -07:00
.vscode Initial commit 2023-04-14 06:02:38 -07:00
lib/bld Initial commit 2023-04-14 06:02:38 -07:00
src Completely reworked the tests 2023-04-14 18:26:25 -07:00
.gitignore Initial commit 2023-04-14 06:02:38 -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 README 2023-04-14 10:02:26 -07:00

Bld Extension to Perform Static Code Analysis with PMD

License (3-Clause BSD) Java GitHub CI

To check all source code using the java quickstart rule.

@BuildCommand
public void pmd() throws Exception {
    new PmdOperation(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(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.