Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error classification in Gradle Enterprise. #4586

Merged
merged 4 commits into from Feb 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.")
}
}
}