Skip to content

Commit b54ac95

Browse files
committed
Enable SpotBugs in the default Maven goal
1 parent f68d095 commit b54ac95

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ file comparators, endian transformation classes, and much more.
353353

354354
<build>
355355
<!-- japicmp:cmp needs package to work from a jar -->
356-
<defaultGoal>clean verify apache-rat:check japicmp:cmp checkstyle:check pmd:check javadoc:javadoc</defaultGoal>
356+
<defaultGoal>clean verify apache-rat:check japicmp:cmp checkstyle:check spotbugs:check pmd:check javadoc:javadoc</defaultGoal>
357357
<pluginManagement>
358358
<plugins>
359359
<plugin>

src/conf/spotbugs-exclude-filter.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@
2020
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2121
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
2222

23+
<!-- TODO Can any of these be done without breaking binary compatibility? -->
24+
<Match>
25+
<Class name="~.*" />
26+
<Or>
27+
<Bug pattern="EI_EXPOSE_REP" />
28+
<Bug pattern="EI_EXPOSE_REP2" />
29+
<Bug pattern="MS_EXPOSE_REP" />
30+
</Or>
31+
</Match>
32+
2333
<!-- See discussion on https://issues.apache.org/jira/browse/IO-216 -->
2434
<Match>
2535
<Class name="org.apache.commons.io.output.LockableFileWriter" />
@@ -47,4 +57,25 @@
4757
<Bug pattern="MS_PKGPROTECT" />
4858
</Match>
4959

60+
<!-- Deprecated -->
61+
<Match>
62+
<Class name="org.apache.commons.io.monitor.FileAlterationObserver" />
63+
<Field name="fileFilter" />
64+
<Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
65+
</Match>
66+
67+
<!-- Deprecated -->
68+
<Match>
69+
<Class name="org.apache.commons.io.monitor.FileAlterationObserver" />
70+
<Field name="listeners" />
71+
<Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
72+
</Match>
73+
74+
<!-- This class only throws unchecked exceptions. -->
75+
<Match>
76+
<Class name="org.apache.commons.io.function.UncheckedIOIterator" />
77+
<Method name="next" />
78+
<Bug pattern="IT_NO_SUCH_ELEMENT" />
79+
</Match>
80+
5081
</FindBugsFilter>

0 commit comments

Comments
 (0)