Skip to content

Commit 0f2dccc

Browse files
committed
Add SpotBugs exclusion filter
1 parent ea13040 commit 0f2dccc

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ limitations under the License.
142142
<resourceExcludes>NOTICE.txt,LICENSE.txt,**/pom.properties,**/sha512.properties</resourceExcludes>
143143
</configuration>
144144
</plugin>
145+
<plugin>
146+
<groupId>com.github.spotbugs</groupId>
147+
<artifactId>spotbugs-maven-plugin</artifactId>
148+
<configuration>
149+
<excludeFilterFile>${basedir}/src/conf/spotbugs-exclude-filter.xml</excludeFilterFile>
150+
</configuration>
151+
</plugin>
145152
</plugins>
146153
</pluginManagement>
147154
<plugins>
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
9+
10+
https://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
<FindBugsFilter 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+
<Match>
22+
<!-- Deprecated, binary compatibility. -->
23+
<Bug pattern="SS_SHOULD_BE_STATIC" />
24+
<Class name="org.apache.commons.codec.binary.BaseNCodec" />
25+
<Field name="PAD" />
26+
</Match>
27+
<Match>
28+
<!-- By design -->
29+
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
30+
<Class name="org.apache.commons.codec.digest.MurmurHash2" />
31+
</Match>
32+
<Match>
33+
<!-- By design -->
34+
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
35+
<Class name="org.apache.commons.codec.digest.MurmurHash3" />
36+
</Match>
37+
<Match>
38+
<!-- By design -->
39+
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
40+
<Class name="org.apache.commons.codec.digest.MurmurHash3$IncrementalHash32" />
41+
</Match>
42+
<Match>
43+
<!-- By design -->
44+
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
45+
<Class name="org.apache.commons.codec.digest.MurmurHash3$IncrementalHash32x86" />
46+
</Match>
47+
<Match>
48+
<!-- By design -->
49+
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
50+
<Class name="org.apache.commons.codec.digest.PureJavaCrc32" />
51+
</Match>
52+
<Match>
53+
<!-- By design -->
54+
<Bug pattern="SF_SWITCH_NO_DEFAULT" />
55+
<Class name="org.apache.commons.codec.digest.PureJavaCrc32C" />
56+
</Match>
57+
<Match>
58+
<!-- TODO ? / By design -->
59+
<Bug pattern="SF_SWITCH_FALLTHROUGH" />
60+
</Match>
61+
<Match>
62+
<!-- TODO ? -->
63+
<Bug pattern="CT_CONSTRUCTOR_THROW" />
64+
</Match>
65+
<Match>
66+
<!-- TODO ? -->
67+
<Bug pattern="ICAST_QUESTIONABLE_UNSIGNED_RIGHT_SHIFT" />
68+
<Class name="org.apache.commons.codec.digest.Blake3" />
69+
<Method name="packInt" />
70+
</Match>
71+
<Match>
72+
<!-- TODO ? -->
73+
<Bug pattern="EI_EXPOSE_REP2" />
74+
<Class name="org.apache.commons.codec.language.DoubleMetaphone$DoubleMetaphoneResult" />
75+
<Method name="&lt;init&gt;" />
76+
</Match>
77+
<Match>
78+
<!-- TODO ? -->
79+
<Bug pattern="EI_EXPOSE_REP" />
80+
<Class name="org.apache.commons.codec.language.bm.Languages" />
81+
<Method name="getLanguages" />
82+
</Match>
83+
<Match>
84+
<!-- Seems like an FP since the return type is a CharSequence. -->
85+
<Bug pattern="EI_EXPOSE_REP" />
86+
<Class name="org.apache.commons.codec.language.bm.Rule$Phoneme" />
87+
<Method name="getPhonemeText" />
88+
</Match>
89+
<Match>
90+
<!-- TODO ? -->
91+
<Bug pattern="EI_EXPOSE_REP" />
92+
<Class name="org.apache.commons.codec.language.bm.Rule$PhonemeList" />
93+
<Method name="getPhonemes" />
94+
</Match>
95+
<Match>
96+
<!-- TODO ? -->
97+
<Bug pattern="EI_EXPOSE_REP2" />
98+
<Class name="org.apache.commons.codec.language.bm.Rule$PhonemeList" />
99+
<Method name="&lt;init&gt;" />
100+
</Match>
101+
</FindBugsFilter>

0 commit comments

Comments
 (0)