Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions hadoop-ozone/dev-support/checks/findbugs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ MAVEN_OPTIONS='-B -fae -Dskip.npx -Dskip.installnpx'

if ! type unionBugs >/dev/null 2>&1 || ! type convertXmlToText >/dev/null 2>&1; then
#shellcheck disable=SC2086
mvn ${MAVEN_OPTIONS} compile spotbugs:check
mvn ${MAVEN_OPTIONS} test-compile spotbugs:check
exit $?
fi

#shellcheck disable=SC2086
mvn ${MAVEN_OPTIONS} compile spotbugs:spotbugs
mvn ${MAVEN_OPTIONS} test-compile spotbugs:spotbugs
rc=$?

REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/findbugs"}
mkdir -p "$REPORT_DIR"
Expand All @@ -42,3 +43,5 @@ wc -l "$REPORT_FILE" | awk '{print $1}'> "$REPORT_DIR/failures"
if [[ -s "${REPORT_FILE}" ]]; then
exit 1
fi

exit ${rc}
21 changes: 21 additions & 0 deletions hadoop-ozone/interface-storage/dev-support/findbugsExcludeFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--
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.
-->
<FindBugsFilter>
<Match>
<Package name="org.apache.hadoop.ozone.storage.proto"/>
</Match>
</FindBugsFilter>
9 changes: 8 additions & 1 deletion hadoop-ozone/interface-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
</project>