Skip to content

Commit

Permalink
Update spotbugs config
Browse files Browse the repository at this point in the history
  • Loading branch information
JordonPhillips committed Sep 16, 2021
1 parent 6574d17 commit 8fdd103
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {
signing
checkstyle
jacoco
id("com.github.spotbugs") version "4.7.1"
id("com.github.spotbugs") version "4.7.4"
id("io.codearte.nexus-staging") version "0.30.0"
}

Expand Down Expand Up @@ -246,12 +246,11 @@ subprojects {
tasks["spotbugsTest"].enabled = false

// Configure the bug filter for spotbugs.
spotbugs {
setEffort("max")
val excludeFile = File("${project.rootDir}/config/spotbugs/filter.xml")
if (excludeFile.exists()) {
excludeFilter.set(excludeFile)
}
tasks.withType<com.github.spotbugs.snom.SpotBugsTask>().configureEach {
effort.set(com.github.spotbugs.snom.Effort.MAX)
excludeFilter.set(file("${project.rootDir}/config/spotbugs/filter.xml"))
reports.maybeCreate("xml").isEnabled = false
reports.maybeCreate("html").isEnabled = true
}
}
}
2 changes: 1 addition & 1 deletion codegen/config/spotbugs/filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@

<!-- Exceptions aren't going to be serialized. -->
<Match>
<Bug pattern="SE_NO_SERIALVERSIONID,SE_BAD_FIELD"/>
<Bug pattern="SE_NO_SERIALVERSIONID,SE_BAD_FIELD,EI_EXPOSE_REP,EI_EXPOSE_REP2"/>
</Match>
</FindBugsFilter>

0 comments on commit 8fdd103

Please sign in to comment.