Better error classification in Gradle Enterprise. (#4586)

* 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
This commit is contained in:
Nelson Osacky
2022-02-19 23:51:29 +01:00
committed by GitHub
parent f15ce50d5e
commit cf4b7bd091
2 changed files with 3 additions and 3 deletions

View File

@@ -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
@@ -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

View File

@@ -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.")
}
}
}