Skip to content

Commit

Permalink
Merge pull request #469 from hazendaz/spotbugs
Browse files Browse the repository at this point in the history
For project self usage, add spotbugs exclusion rules
  • Loading branch information
hazendaz committed Jul 24, 2022
2 parents e50598e + b6598f5 commit a0fa0f9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@
</configuration>
</plugin>

<!-- TODO: pdf fails on site so skip it at this time -->
<!-- TODO: pdf fails on site if reports included so skip reports at this time -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pdf-plugin</artifactId>
Expand All @@ -636,7 +636,7 @@
<goal>descriptor</goal>
</goals>
</execution>
<!-- if you want to generate help goal -->
<!-- Generate help goal -->
<execution>
<id>help-goal</id>
<goals>
Expand Down Expand Up @@ -746,6 +746,9 @@
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${project.version}</version>
<configuration>
<excludeFilterFile>${project.basedir}/src/main/tools/spotbugs-exclude-filters.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
33 changes: 33 additions & 0 deletions src/main/tools/spotbugs-exclude-filters.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter>
<!-- Not a concerning issue here -->
<Match>
<Source name="~.*\.groovy" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<!-- Not a concerning issue here -->
<Match>
<Source name="~.*\.groovy" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<!-- Two of these were resolved but fb-contrib thinks not (bug in fb-contrib?) -->
<Match>
<Source name="~.*\.groovy" />
<Bug pattern="LEST_LOST_EXCEPTION_STACK_TRACE" />
</Match>
<!-- Not a concerning issue here -->
<Match>
<Source name="~.*\.groovy" />
<Bug pattern="PCOA_PARTIALLY_CONSTRUCTED_OBJECT_ACCESS" />
</Match>
<!-- Caused by groovy closures, suggested way to ignore -->
<Match>
<Source name="~.*\.groovy" />
<Bug pattern="SE_NO_SERIALVERSIONID" />
</Match>
<!-- Excluding xxe as from maven help mojo and we are otherwise all groovy -->
<Match>
<Source name="~.*\.java" />
<Bug pattern=" XXE_DOCUMENT" />
</Match>
</FindBugsFilter>

0 comments on commit a0fa0f9

Please sign in to comment.