This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-io.git
commit b54ac951c940449709ed25d1f908e008bb56e28d Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Nov 24 10:36:27 2023 -0500 Enable SpotBugs in the default Maven goal --- pom.xml | 2 +- src/conf/spotbugs-exclude-filter.xml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8b73edae..0c27c7e5 100644 --- a/pom.xml +++ b/pom.xml @@ -353,7 +353,7 @@ file comparators, endian transformation classes, and much more. <build> <!-- japicmp:cmp needs package to work from a jar --> - <defaultGoal>clean verify apache-rat:check japicmp:cmp checkstyle:check pmd:check javadoc:javadoc</defaultGoal> + <defaultGoal>clean verify apache-rat:check japicmp:cmp checkstyle:check spotbugs:check pmd:check javadoc:javadoc</defaultGoal> <pluginManagement> <plugins> <plugin> diff --git a/src/conf/spotbugs-exclude-filter.xml b/src/conf/spotbugs-exclude-filter.xml index 000c565d..1e3fe6d7 100644 --- a/src/conf/spotbugs-exclude-filter.xml +++ b/src/conf/spotbugs-exclude-filter.xml @@ -20,6 +20,16 @@ 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"> + <!-- TODO Can any of these be done without breaking binary compatibility? --> + <Match> + <Class name="~.*" /> + <Or> + <Bug pattern="EI_EXPOSE_REP" /> + <Bug pattern="EI_EXPOSE_REP2" /> + <Bug pattern="MS_EXPOSE_REP" /> + </Or> + </Match> + <!-- See discussion on https://issues.apache.org/jira/browse/IO-216 --> <Match> <Class name="org.apache.commons.io.output.LockableFileWriter" /> @@ -47,4 +57,25 @@ <Bug pattern="MS_PKGPROTECT" /> </Match> + <!-- Deprecated --> + <Match> + <Class name="org.apache.commons.io.monitor.FileAlterationObserver" /> + <Field name="fileFilter" /> + <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" /> + </Match> + + <!-- Deprecated --> + <Match> + <Class name="org.apache.commons.io.monitor.FileAlterationObserver" /> + <Field name="listeners" /> + <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" /> + </Match> + + <!-- This class only throws unchecked exceptions. --> + <Match> + <Class name="org.apache.commons.io.function.UncheckedIOIterator" /> + <Method name="next" /> + <Bug pattern="IT_NO_SUCH_ELEMENT" /> + </Match> + </FindBugsFilter>