Skip to content

Commit

Permalink
Better error classification in Gradle Enterprise. (#4586)
Browse files Browse the repository at this point in the history
* Better error classification in Gradle Enterprise.

Use `Lint failed` instead of `Build failed` in exception

Fixes #4585

* Use Analysis failed instead of Lint failed

* Fix failing test not using new artifact

* Undo change to gradle build
  • Loading branch information
runningcode committed Feb 19, 2022
1 parent f15ce50 commit cf4b7bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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("Build 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("Build 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("Build failed with $numberOfIssues weighted issues.")
throw MaxIssuesReached("Analysis failed with $numberOfIssues weighted issues.")
}
}
}

0 comments on commit cf4b7bd

Please sign in to comment.