Skip to content
Permalink
Browse files
FILEUPLOAD-323 - Implement spotbugs
  • Loading branch information
arturobernalg committed Apr 29, 2021
1 parent d863336 commit 92386e20c4f0bed4a2e2781390d63a0685f1760b
Showing 3 changed files with 80 additions and 2 deletions.
@@ -44,4 +44,4 @@ jobs:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -V package --file pom.xml --no-transfer-progress
run: mvn -V package --file pom.xml --no-transfer-progress spotbugs:check
19 pom.xml
@@ -232,6 +232,8 @@
<commons.distSvnStagingUrl>scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}</commons.distSvnStagingUrl>
<commons.releaseManagerName>Rob Tompkins</commons.releaseManagerName>
<commons.releaseManagerKey>B6E73D84EA4FCC47166087253FAAD2CD5ECBB314</commons.releaseManagerKey>
<spotbugs.plugin.version>4.2.3</spotbugs.plugin.version>
<spotbugs.impl.version>4.2.3</spotbugs.impl.version>
</properties>

<dependencies>
@@ -357,7 +359,7 @@
</plugin>
</plugins>
</pluginManagement>
<defaultGoal>clean verify apache-rat:check clirr:check javadoc:javadoc</defaultGoal>
<defaultGoal>clean verify apache-rat:check clirr:check javadoc:javadoc spotbugs:check</defaultGoal>
</build>

<reporting>
@@ -458,6 +460,21 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs.plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>${spotbugs.impl.version}</version>
</dependency>
</dependencies>
<configuration>
<excludeFilterFile>${basedir}/spotbugs-exclude-filter.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
</build>
</profile>
@@ -0,0 +1,61 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<!--
This file contains some false positive bugs detected by spotbugs. Their
false positive nature has been analyzed individually and they have been
put here to instruct findbugs it must ignore them.
-->
<FindBugsFilter>
<!-- Reason: Initial commit. Need to refine -->
<Match>
<Class name="org.apache.commons.fileupload2.MultipartStream" />
<Method name="readHeaders" />
<Bug pattern="DM_DEFAULT_ENCODING" />
</Match>
<Match>
<Class name="org.apache.commons.fileupload2.MultipartStream" />
<Bug pattern="MS_PKGPROTECT" />
</Match>
<Match>
<Class name="org.apache.commons.fileupload2.ParameterParser" />
<Method name="parse" />
<Bug pattern="EI_EXPOSE_REP2" />
</Match>
<Match>
<Class name="org.apache.commons.fileupload2.disk.DiskFileItem" />
<Bug pattern="DM_DEFAULT_ENCODING" />
</Match>
<Match>
<Class name="org.apache.commons.fileupload2.disk.DiskFileItem" />
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.apache.commons.fileupload2.disk.DiskFileItem" />
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
</Match>
<Match>
<Class name="org.apache.commons.fileupload2.jaksrvlt.JakSrvltFileUpload" />
<Bug pattern="NM_WRONG_PACKAGE" />
</Match>
<Match>
<Class name="org.apache.commons.fileupload2.util.Streams" />
<Method name="asString" />
<Bug pattern="DM_DEFAULT_ENCODING" />
</Match>
</FindBugsFilter>

0 comments on commit 92386e2

Please sign in to comment.