replace findbugs with spotbugs (#56)

This commit is contained in:
Amey Jadiye 2020-02-13 02:44:28 +05:30 committed by GitHub
parent e60777139f
commit d83dab4b09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 31 deletions

31
pom.xml
View File

@ -168,7 +168,7 @@
</properties>
<build>
<defaultGoal>clean verify apache-rat:check clirr:check javadoc:javadoc</defaultGoal>
<defaultGoal>clean verify apache-rat:check clirr:check checkstyle:check spotbugs:check javadoc:javadoc</defaultGoal>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@ -208,15 +208,12 @@
<suppressionsLocation>${basedir}/src/main/resources/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
</configuration>
</plugin>
<!-- Allow findbugs to be run interactively; keep in sync with report config below -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>${commons.findbugs.version}</version>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${commons.spotbugs.version}</version>
<configuration>
<threshold>Normal</threshold>
<effort>Default</effort>
<excludeFilterFile>${basedir}/src/main/resources/findbugs/findbugs-exclude-filter.xml</excludeFilterFile>
<excludeFilterFile>${basedir}/src/site/resources/spotbugs/spotbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
<!-- Allow pmd to be run interactively; keep in sync with report config below -->
@ -287,6 +284,14 @@
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${commons.spotbugs.version}</version>
<configuration>
<excludeFilterFile>${basedir}/src/site/resources/spotbugs/spotbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
@ -300,16 +305,6 @@
</rulesets>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>${commons.findbugs.version}</version>
<configuration>
<threshold>Normal</threshold>
<effort>Default</effort>
<excludeFilterFile>${basedir}/src/main/resources/findbugs/findbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@ -15,21 +14,18 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This file contains some false positive bugs detected by spotbugs. Their
false positive nature has been analyzed individually and they have been
put here to instruct spotbugs it must ignore them.
-->
<FindBugsFilter
xmlns="https://github.com/spotbugs/filter/3.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
xmlns="https://github.com/spotbugs/filter/3.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
<Match>
<Class name="org.apache.commons.csv.CSVPrinter"/>
<BugPattern name="SF_SWITCH_FALLTHROUGH"/>
<Method name="printComment"/>
<Class name="org.apache.commons.csv.CSVPrinter" />
<Method name="printComment" >
<!-- Deliberate switch statement fall-through -->
</Method>
<Bug code="SF" />
</Match>
</FindBugsFilter>