bld extension to perform static code analysis with Detekt for Kotlin https://github.com/rife2/bld-detekt
Find a file
2024-03-25 11:54:09 -07:00
.github/workflows Added JDK 22 to CI 2024-03-21 13:39:04 -07:00
.idea Bumped to bld 1.9.0 2024-03-21 00:29:24 -07:00
.vscode Bumped to bld 1.9.0 2024-03-21 00:29:24 -07:00
config Added PMD extension 2023-11-25 15:00:41 -08:00
examples Added support for Detekt version 1.23.6 2024-03-25 11:54:09 -07:00
lib/bld Added support for Detekt version 1.23.6 2024-03-25 11:54:09 -07:00
src Added support for Detekt version 1.23.6 2024-03-25 11:54:09 -07:00
.gitignore Initial commit 2023-11-25 14:41:22 -08:00
bld Initial commit 2023-11-25 14:41:22 -08:00
bld.bat Initial commit 2023-11-25 14:41:22 -08:00
checkcliargs.sh Added script to compare CLI arguments 2024-03-21 00:29:10 -07:00
README.md Bumped to bld 1.9.0 2024-03-21 00:29:24 -07:00

bld Extension to Perform Static Code Analysis with Detekt for Kotlin

License Java bld Release Snapshot GitHub CI

To install, please refer to the extensions documentation.

To check all Kotlin source code located in the project, add the following to your build file:

@BuildCommand(summary = "Checks source with Detekt")
public void detekt() throws ExitStatusException, IOException, InterruptedException {
    new DetektOperation()
        .fromProject(this)
        .execute();
}
./bld compile detekt

To generate a Detekt baseline, add the following to your build file:

@BuildCommand(value = "detekt-baseline", summary = "Creates the Detekt baseline")
public void detektBaseline() throws ExitStatusException, IOException, InterruptedException {
    new DetektOperation()
        .fromProject(this)
        .baseline("detekt-baseline.xml")
        .createBaseline(true)
        .execute();
}
./bld compile detekt-baseline

Please check the DetektOperation documentation for all available configuration options.