bld extension to perform static code analysis with Detekt for Kotlin https://github.com/rife2/bld-detekt
Find a file
2023-11-25 14:41:22 -08:00
.github/workflows Initial commit 2023-11-25 14:41:22 -08:00
.idea Initial commit 2023-11-25 14:41:22 -08:00
.vscode Initial commit 2023-11-25 14:41:22 -08:00
examples Initial commit 2023-11-25 14:41:22 -08:00
lib/bld Initial commit 2023-11-25 14:41:22 -08:00
src Initial commit 2023-11-25 14:41:22 -08: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
README.md Initial commit 2023-11-25 14:41:22 -08: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 src/main/kotlin and src/test/kotlin, add the following to your build file

@BuildCommand(summary = "Check 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 a 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.