mirror of
https://github.com/jlengrand/detekt.git
synced 2026-03-10 08:11:23 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user