Skip to content

Commit

Permalink
Merge pull request #165 from Ozsie/dependabot/maven/detekt.version-1.…
Browse files Browse the repository at this point in the history
…22.0

Bump detekt.version from 1.21.0 to 1.22.0
  • Loading branch information
Ozsie authored Nov 21, 2022
2 parents e5d4220 + eb40f71 commit b0c937f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

<!-- Compile -->
<kotlin.version>1.6.10</kotlin.version>
<detekt.version>1.21.0</detekt.version>
<detekt.version>1.22.0</detekt.version>
<jcommander.version>1.82</jcommander.version>
<snakeyaml.version>1.21</snakeyaml.version>
<maven.api.version>3.8.6</maven.api.version>
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/github/ozsie/DetektMojo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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<String>()

Expand All @@ -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 = ""

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/com/github/ozsie/CheckMojoSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand All @@ -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") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()") {
Expand All @@ -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") {
Expand Down

0 comments on commit b0c937f

Please sign in to comment.