Skip to content

Commit 115b3d7

Browse files
committed
Update findbugs to allow deliberate fall-through
1 parent 98adacf commit 115b3d7

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,17 @@ CSV files of various types.
202202
<enableRulesSummary>false</enableRulesSummary>
203203
</configuration>
204204
</plugin>
205+
<!-- Allow findbugs to be run interactively; keep in sync with report config below -->
206+
<plugin>
207+
<groupId>org.codehaus.mojo</groupId>
208+
<artifactId>findbugs-maven-plugin</artifactId>
209+
<version>${commons.findbugs.version}</version>
210+
<configuration>
211+
<threshold>Normal</threshold>
212+
<effort>Default</effort>
213+
<excludeFilterFile>${basedir}/src/main/resources/findbugs/findbugs-exclude-filter.xml</excludeFilterFile>
214+
</configuration>
215+
</plugin>
205216

206217
<!-- We need to add our test data files to rat exclusions -->
207218
<!-- Needed for command-line access, e.g mvn apache-rat:rat and mvn apache-rat:check -->
@@ -266,6 +277,11 @@ CSV files of various types.
266277
<groupId>org.codehaus.mojo</groupId>
267278
<artifactId>findbugs-maven-plugin</artifactId>
268279
<version>${commons.findbugs.version}</version>
280+
<configuration>
281+
<threshold>Normal</threshold>
282+
<effort>Default</effort>
283+
<excludeFilterFile>${basedir}/src/main/resources/findbugs/findbugs-exclude-filter.xml</excludeFilterFile>
284+
</configuration>
269285
</plugin>
270286
<plugin>
271287
<groupId>org.codehaus.mojo</groupId>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0"?>
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+
http://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+
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+
-->
24+
<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">
28+
29+
<Match>
30+
<Class name="~.*\.jmh\..*generated\..*"/>
31+
</Match>
32+
33+
<Match>
34+
<!-- Direct access to an internal array is required for the benchmark. -->
35+
<Class name="org.apache.commons.csv.CSVPrinter"/>
36+
<BugPattern name="SF_SWITCH_FALLTHROUGH"/>
37+
<Method name="printComment"/>
38+
</Match>
39+
40+
</FindBugsFilter>

0 commit comments

Comments
 (0)