Skip to content

Commit f7a5e04

Browse files
Copilottrask
andcommitted
Fix SpotBugs 6.2.1 compatibility by properly configuring tasks to ignore missing class failures
Co-authored-by: trask <[email protected]>
1 parent c855ad0 commit f7a5e04

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

buildSrc/src/main/kotlin/ai.spotbugs-conventions.gradle.kts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,10 @@ tasks {
3232
enabled = false
3333
}
3434

35+
// Configure SpotBugs tasks to handle missing classes in 6.2.x
3536
withType<com.github.spotbugs.snom.SpotBugsTask>().configureEach {
36-
reports.create("xml") {
37-
required.set(false)
38-
}
39-
// SpotBugs 6.2.x is stricter about missing classes and fails with exit code 3
40-
// We only use SpotBugs for the findsecbugs plugin (security analysis) and suppress everything else
41-
// So ignoring failures here is safe since we use errorprone for other static analysis
37+
// Direct approach: Set the task to not fail on errors
38+
// This is the most reliable way to handle SpotBugs 6.2.x missing class issues
4239
ignoreFailures = true
4340
}
4441
}

0 commit comments

Comments
 (0)