Skip to content

Commit 89e619b

Browse files
authored
SpotBugs Gradle plugin v6 (#1929)
2 parents f6d7db5 + 7901c64 commit 89e619b

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

gradle/java-setup.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ tasks.withType(JavaCompile).configureEach {
1515
apply plugin: 'com.github.spotbugs'
1616
spotbugs {
1717
ignoreFailures = false // bug free or it doesn't ship!
18-
reportLevel = 'medium' // low|medium|high (low = sensitive to even minor mistakes)
18+
// LOW|MEDIUM|DEFAULT|HIGH (low = sensitive to even minor mistakes).
19+
reportLevel = com.github.spotbugs.snom.Confidence.valueOf('MEDIUM')
1920
omitVisitors = [
2021
// https://spotbugs.readthedocs.io/en/latest/detectors.html#constructorthrow
2122
'ConstructorThrow',

lib-extra/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,8 @@ p2deps {
9191
}
9292

9393
// we'll hold the core lib to a high standard
94-
spotbugs { reportLevel = 'low' } // low|medium|high (low = sensitive to even minor mistakes)
94+
spotbugs {
95+
// LOW|MEDIUM|DEFAULT|HIGH (low = sensitive to even minor mistakes).
96+
reportLevel = com.github.spotbugs.snom.Confidence.valueOf('LOW')
97+
}
9598

lib/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ dependencies {
126126
}
127127

128128
// we'll hold the core lib to a high standard
129-
spotbugs { reportLevel = 'low' } // low|medium|high (low = sensitive to even minor mistakes)
129+
spotbugs {
130+
// LOW|MEDIUM|DEFAULT|HIGH (low = sensitive to even minor mistakes).
131+
reportLevel = com.github.spotbugs.snom.Confidence.valueOf('LOW')
132+
}
130133

131134
apply from: rootProject.file('gradle/special-tests.gradle')
132135
tasks.withType(Test).configureEach {

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
// https://github.com/gradle-nexus/publish-plugin/releases
1313
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0' apply false
1414
// https://github.com/spotbugs/spotbugs-gradle-plugin/releases
15-
id 'com.github.spotbugs' version '5.2.3' apply false
15+
id 'com.github.spotbugs' version '6.0.1' apply false
1616
// https://github.com/diffplug/spotless-changelog/blob/main/CHANGELOG.md
1717
id 'com.diffplug.spotless-changelog' version '3.0.2' apply false
1818
// https://github.com/diffplug/goomph/blob/main/CHANGES.md

testlib/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ dependencies {
2121
}
2222

2323
// we'll hold the testlib to a low standard (prize brevity)
24-
spotbugs { reportLevel = 'high' } // low|medium|high (low = sensitive to even minor mistakes)
24+
spotbugs {
25+
// LOW|MEDIUM|DEFAULT|HIGH (low = sensitive to even minor mistakes).
26+
reportLevel = com.github.spotbugs.snom.Confidence.valueOf('HIGH')
27+
}
2528

2629
apply from: rootProject.file('gradle/special-tests.gradle')
2730
tasks.withType(Test).configureEach {

0 commit comments

Comments
 (0)