From 924b519fc86b50e8240782b78c622dae0e17e052 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Nov 2022 04:11:54 +0000 Subject: [PATCH 1/3] Bump detekt.version from 1.21.0 to 1.22.0 Bumps `detekt.version` from 1.21.0 to 1.22.0. Updates `detekt-tooling` from 1.21.0 to 1.22.0 - [Release notes](https://github.com/detekt/detekt/releases) - [Commits](https://github.com/detekt/detekt/commits) Updates `detekt-cli` from 1.21.0 to 1.22.0 - [Release notes](https://github.com/detekt/detekt/releases) - [Commits](https://github.com/detekt/detekt/commits) --- updated-dependencies: - dependency-name: io.gitlab.arturbosch.detekt:detekt-tooling dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.gitlab.arturbosch.detekt:detekt-cli dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dd2b093..0a1a17f 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ 1.6.10 - 1.21.0 + 1.22.0 1.82 1.21 3.8.6 From a45e362d87c8d7f60f6a97a33faaeb033b4746d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Nov 2022 13:41:00 +0000 Subject: [PATCH 2/3] Bump detekt.version from 1.21.0 to 1.22.0 Bumps `detekt.version` from 1.21.0 to 1.22.0. Updates `detekt-tooling` from 1.21.0 to 1.22.0 - [Release notes](https://github.com/detekt/detekt/releases) - [Commits](https://github.com/detekt/detekt/commits) Updates `detekt-cli` from 1.21.0 to 1.22.0 - [Release notes](https://github.com/detekt/detekt/releases) - [Commits](https://github.com/detekt/detekt/commits) --- updated-dependencies: - dependency-name: io.gitlab.arturbosch.detekt:detekt-tooling dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.gitlab.arturbosch.detekt:detekt-cli dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6f2ff69..8ef349b 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ 1.6.10 - 1.21.0 + 1.22.0 1.82 1.21 3.8.6 From eb40f716b58c3a764eccd93aed8cef1812022f8d Mon Sep 17 00:00:00 2001 From: Ozsie Date: Mon, 21 Nov 2022 14:44:03 +0100 Subject: [PATCH 3/3] Updated availabe config based on latest cli changes --- README.md | 2 +- src/main/java/com/github/ozsie/DetektMojo.kt | 10 +++++----- src/test/java/com/github/ozsie/CheckMojoSpec.kt | 2 -- .../github/ozsie/CheckWithTypeResolutionMojoSpec.kt | 2 -- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index e86b1a9..0cc01a8 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ A maven plugin that wraps the Detekt CLI. It supports the same parameters as the ``` Using the above configuration, Detekt will scan source files in _${basedir}/src_ and output the results in _${basedir}/detekt_. -All parameters available to Detekt version _1.21.0_ can be configured in +All parameters available to Detekt version _1.22.0_ can be configured in the plugin. ### Remote configuration diff --git a/src/main/java/com/github/ozsie/DetektMojo.kt b/src/main/java/com/github/ozsie/DetektMojo.kt index d934fe2..21eb6e8 100644 --- a/src/main/java/com/github/ozsie/DetektMojo.kt +++ b/src/main/java/com/github/ozsie/DetektMojo.kt @@ -16,9 +16,9 @@ const val CONFIG_RESOURCE = "-cr" const val DEBUG = "--debug" const val DISABLE_DEFAULT_RULE_SET = "-dd" const val EXCLUDES = "-ex" -const val FAIL_FAST = "--fail-fast" const val INCLUDES = "-in" const val INPUT = "-i" +const val JDK_HOME = "--jdk-home" const val JVM_TARGET = "--jvm-target" const val LANGUAGE_VERSION = "--language-version" const val MAX_ISSUES = "--max-issues" @@ -70,9 +70,6 @@ abstract class DetektMojo : AbstractMojo() { @Parameter(property = "detekt.buildUponDefaultConfig", defaultValue = "false") var buildUponDefaultConfig = false - @Parameter(property = "detekt.failFast", defaultValue = "false") - var failFast = false - @Parameter(property = "detekt.report") var report = ArrayList() @@ -91,6 +88,9 @@ abstract class DetektMojo : AbstractMojo() { @Parameter(property = "detekt.includes") var includes = "" + @Parameter(property = "detekt.jdkHome") + var jdkHome = "" + @Parameter(property = "detekt.jvmTarget") var jvmTarget = "" @@ -122,13 +122,13 @@ abstract class DetektMojo : AbstractMojo() { .useIf(input.isNotEmpty(), INPUT, input) .useIf(report.isNotEmpty(), reportsToArgList(report)) .useIf(buildUponDefaultConfig, BUILD_UPON_DEFAULT_CONFIG) - .useIf(failFast, FAIL_FAST) .useIf(plugins.isNotEmpty(), PLUGINS, plugins.buildPluginPaths(mavenProject, localRepoLocation, this@DetektMojo.log)) .useIf(autoCorrect, AUTO_CORRECT) .useIf(classPath.isNotEmpty(), CLASS_PATH, classPath) .useIf(excludes.isNotEmpty(), EXCLUDES, excludes) .useIf(includes.isNotEmpty(), INCLUDES, includes) + .useIf(jdkHome.isNotEmpty(), JDK_HOME, jdkHome) .useIf(jvmTarget.isNotEmpty(), JVM_TARGET, jvmTarget) .useIf(languageVersion.isNotEmpty(), LANGUAGE_VERSION, languageVersion) .useIf(allRules, ALL_RULES) diff --git a/src/test/java/com/github/ozsie/CheckMojoSpec.kt b/src/test/java/com/github/ozsie/CheckMojoSpec.kt index 2fadc28..96ea88d 100644 --- a/src/test/java/com/github/ozsie/CheckMojoSpec.kt +++ b/src/test/java/com/github/ozsie/CheckMojoSpec.kt @@ -41,7 +41,6 @@ class CheckMojoSpec : Spek({ val checkMojo = CheckMojo().apply { input = invalidPackageNamingDirectoryPath failBuildOnMaxIssuesReached = false - failFast = true // fail on any issue } on("checkMojo.execute()") { test("Unit is expected") { @@ -56,7 +55,6 @@ class CheckMojoSpec : Spek({ val checkMojo = CheckMojo().apply { input = invalidPackageNamingDirectoryPath failBuildOnMaxIssuesReached = true - failFast = true // fail on any issue } on("checkMojo.execute()") { test("Unit is expected") { diff --git a/src/test/java/com/github/ozsie/CheckWithTypeResolutionMojoSpec.kt b/src/test/java/com/github/ozsie/CheckWithTypeResolutionMojoSpec.kt index d837aab..4aa1c17 100644 --- a/src/test/java/com/github/ozsie/CheckWithTypeResolutionMojoSpec.kt +++ b/src/test/java/com/github/ozsie/CheckWithTypeResolutionMojoSpec.kt @@ -36,7 +36,6 @@ class CheckWithTypeResolutionMojoSpec : Spek({ given("a CheckMojo and 'failBuildOnMaxIssuesReached' is false") { val checkMojo = CheckWithTypeResolutionMojoTestFactory.createWithInvalidPackageNamingStructure { failBuildOnMaxIssuesReached = false - failFast = true } on("checkMojo.execute()") { @@ -51,7 +50,6 @@ class CheckWithTypeResolutionMojoSpec : Spek({ given("a CheckMojo and 'failBuildOnMaxIssuesReached' is true") { val checkMojo = CheckWithTypeResolutionMojoTestFactory.createWithInvalidPackageNamingStructure { failBuildOnMaxIssuesReached = true - failFast = true } on("checkMojo.execute()") { test("Unit is expected") {