Skip to content

Commit

Permalink
Use Analysis failed instead of Lint failed
Browse files Browse the repository at this point in the history
  • Loading branch information
runningcode committed Feb 17, 2022
1 parent 9c3c2fb commit cdc5511
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Expand Up @@ -271,7 +271,7 @@ class RunnerSpec {
fun `does fail via cli flag`() {
assertThatThrownBy { executeDetekt("--input", inputPath.toString(), "--max-issues", "0") }
.isExactlyInstanceOf(MaxIssuesReached::class.java)
.hasMessage("Lint failed with 1 weighted issues.")
.hasMessage("Analysis failed with 1 weighted issues.")
}

@Test
Expand All @@ -286,7 +286,7 @@ class RunnerSpec {
"configs/max-issues--1.yml" // allow any
)
}.isExactlyInstanceOf(MaxIssuesReached::class.java)
.hasMessage("Lint failed with 1 weighted issues.")
.hasMessage("Analysis failed with 1 weighted issues.")
}

@Test
Expand Down
Expand Up @@ -33,7 +33,7 @@ internal class MaxIssueCheck(

fun check(numberOfIssues: Int) {
if (!meetsPolicy(numberOfIssues)) {
throw MaxIssuesReached("Lint failed with $numberOfIssues weighted issues.")
throw MaxIssuesReached("Analysis failed with $numberOfIssues weighted issues.")
}
}
}
Expand Up @@ -15,7 +15,7 @@ class JvmSpec {
.withArguments("detektMain")
.buildAndFail()

assertThat(result.output).contains("Lint failed with 2 weighted issues.")
assertThat(result.output).contains("Analysis failed with 2 weighted issues.")
assertThat(result.output).contains("ExitOutsideMain - [kotlinExit]")
assertThat(result.output).contains("ExitOutsideMain - [javaExit]")
}
Expand Down
Expand Up @@ -66,7 +66,7 @@ internal class DefaultCliInvoker(
}
}

private fun isBuildFailure(msg: String) = "Lint failed with" in msg && "issues" in msg
private fun isBuildFailure(msg: String) = "Analysis failed with" in msg && "issues" in msg
}

private class DryRunInvoker(private val logger: Logger) : DetektInvoker {
Expand Down

0 comments on commit cdc5511

Please sign in to comment.