From a13a2b814b3361e5515ff959029a2e0f6b653601 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sat, 25 Nov 2023 16:26:43 -0800 Subject: [PATCH] Added detekt-main & detekt-test examples --- .idea/misc.xml | 3 +++ README.md | 7 +++-- examples/.idea/misc.xml | 4 +++ examples/README.md | 7 +++-- .../bld/java/com/example/ExampleBuild.java | 27 ++++++++++++------- .../src/main/kotlin/com/example/Example.kt | 5 ---- .../bld/extension/DetektOperationBuild.java | 12 ++++----- .../rife/bld/extension/DetektOperation.java | 9 +++++++ 8 files changed, 49 insertions(+), 25 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 542659b..03e18e6 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,8 @@ + + + diff --git a/README.md b/README.md index 13388d9..298c2c0 100755 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ To install, please refer to the [extensions documentation](https://github.com/ri To check all Kotlin source code located `src/main/kotlin` and `src/test/kotlin`, add the following to your build file ```java -@BuildCommand(summary = "Check source with Detekt") +@BuildCommand(summary = "Checks source with Detekt") public void detekt() throws ExitStatusException, IOException, InterruptedException { new DetektOperation() .fromProject(this) @@ -25,10 +25,12 @@ public void detekt() throws ExitStatusException, IOException, InterruptedExcepti ./bld compile detekt ``` +- [View Examples Project](https://github.com/rife2/bld-detekt/tree/main/examples) + To generate a Detekt baseline, add the following to your build file: ```java -@BuildCommand(value = "detekt-baseline", summary = "Creates a Detekt baseline") +@BuildCommand(value = "detekt-baseline", summary = "Creates the Detekt baseline") public void detektBaseline() throws ExitStatusException, IOException, InterruptedException { new DetektOperation() .fromProject(this) @@ -41,5 +43,6 @@ public void detektBaseline() throws ExitStatusException, IOException, Interrupte ```console ./bld compile detekt-baseline ``` +- [View Examples Project](https://github.com/rife2/bld-detekt/tree/main/examples) Please check the [DetektOperation documentation](https://rife2.github.io/bld-detekt/rife/bld/extension/DetektOperation.html#method-summary) for all available configuration options. diff --git a/examples/.idea/misc.xml b/examples/.idea/misc.xml index eb5c27d..09af397 100644 --- a/examples/.idea/misc.xml +++ b/examples/.idea/misc.xml @@ -6,6 +6,10 @@ + + + +