Skip to content

Commit d83dab4

Browse files
authored
replace findbugs with spotbugs (#56)
1 parent e607771 commit d83dab4

2 files changed

Lines changed: 22 additions & 31 deletions

File tree

pom.xml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
</properties>
169169

170170
<build>
171-
<defaultGoal>clean verify apache-rat:check clirr:check javadoc:javadoc</defaultGoal>
171+
<defaultGoal>clean verify apache-rat:check clirr:check checkstyle:check spotbugs:check javadoc:javadoc</defaultGoal>
172172
<plugins>
173173
<plugin>
174174
<artifactId>maven-compiler-plugin</artifactId>
@@ -208,15 +208,12 @@
208208
<suppressionsLocation>${basedir}/src/main/resources/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
209209
</configuration>
210210
</plugin>
211-
<!-- Allow findbugs to be run interactively; keep in sync with report config below -->
212211
<plugin>
213-
<groupId>org.codehaus.mojo</groupId>
214-
<artifactId>findbugs-maven-plugin</artifactId>
215-
<version>${commons.findbugs.version}</version>
212+
<groupId>com.github.spotbugs</groupId>
213+
<artifactId>spotbugs-maven-plugin</artifactId>
214+
<version>${commons.spotbugs.version}</version>
216215
<configuration>
217-
<threshold>Normal</threshold>
218-
<effort>Default</effort>
219-
<excludeFilterFile>${basedir}/src/main/resources/findbugs/findbugs-exclude-filter.xml</excludeFilterFile>
216+
<excludeFilterFile>${basedir}/src/site/resources/spotbugs/spotbugs-exclude-filter.xml</excludeFilterFile>
220217
</configuration>
221218
</plugin>
222219
<!-- Allow pmd to be run interactively; keep in sync with report config below -->
@@ -287,6 +284,14 @@
287284
</reportSet>
288285
</reportSets>
289286
</plugin>
287+
<plugin>
288+
<groupId>com.github.spotbugs</groupId>
289+
<artifactId>spotbugs-maven-plugin</artifactId>
290+
<version>${commons.spotbugs.version}</version>
291+
<configuration>
292+
<excludeFilterFile>${basedir}/src/site/resources/spotbugs/spotbugs-exclude-filter.xml</excludeFilterFile>
293+
</configuration>
294+
</plugin>
290295
<plugin>
291296
<groupId>org.apache.maven.plugins</groupId>
292297
<artifactId>maven-pmd-plugin</artifactId>
@@ -300,16 +305,6 @@
300305
</rulesets>
301306
</configuration>
302307
</plugin>
303-
<plugin>
304-
<groupId>org.codehaus.mojo</groupId>
305-
<artifactId>findbugs-maven-plugin</artifactId>
306-
<version>${commons.findbugs.version}</version>
307-
<configuration>
308-
<threshold>Normal</threshold>
309-
<effort>Default</effort>
310-
<excludeFilterFile>${basedir}/src/main/resources/findbugs/findbugs-exclude-filter.xml</excludeFilterFile>
311-
</configuration>
312-
</plugin>
313308
<plugin>
314309
<groupId>org.codehaus.mojo</groupId>
315310
<artifactId>taglist-maven-plugin</artifactId>

src/main/resources/findbugs/findbugs-exclude-filter.xml renamed to src/site/resources/spotbugs/spotbugs-exclude-filter.xml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<?xml version="1.0"?>
21
<!--
32
Licensed to the Apache Software Foundation (ASF) under one or more
43
contributor license agreements. See the NOTICE file distributed with
@@ -15,21 +14,18 @@
1514
See the License for the specific language governing permissions and
1615
limitations under the License.
1716
-->
18-
19-
<!--
20-
This file contains some false positive bugs detected by spotbugs. Their
21-
false positive nature has been analyzed individually and they have been
22-
put here to instruct spotbugs it must ignore them.
23-
-->
2417
<FindBugsFilter
25-
xmlns="https://github.com/spotbugs/filter/3.0.0"
26-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
27-
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
18+
xmlns="https://github.com/spotbugs/filter/3.0.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
21+
2822

2923
<Match>
30-
<Class name="org.apache.commons.csv.CSVPrinter"/>
31-
<BugPattern name="SF_SWITCH_FALLTHROUGH"/>
32-
<Method name="printComment"/>
24+
<Class name="org.apache.commons.csv.CSVPrinter" />
25+
<Method name="printComment" >
26+
<!-- Deliberate switch statement fall-through -->
27+
</Method>
28+
<Bug code="SF" />
3329
</Match>
3430

3531
</FindBugsFilter>

0 commit comments

Comments
 (0)