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-validator.git
commit 05e86a6b17375cec4d1eb78c2ee65d5b3d457f61 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Dec 1 08:18:54 2023 -0500 Enable SpotBugs --- pom.xml | 6 +++++- src/conf/spotbugs-exclude-filter.xml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ad9e76aa..5541fbe8 100644 --- a/pom.xml +++ b/pom.xml @@ -78,7 +78,7 @@ </distributionManagement> <build> - <defaultGoal>clean verify apache-rat:check japicmp:cmp checkstyle:check javadoc:javadoc</defaultGoal> + <defaultGoal>clean verify apache-rat:check japicmp:cmp checkstyle:check spotbugs:check javadoc:javadoc</defaultGoal> <pluginManagement> <plugins> <plugin> @@ -246,6 +246,10 @@ </excludes> </configuration> </plugin> + <plugin> + <groupId>com.github.spotbugs</groupId> + <artifactId>spotbugs-maven-plugin</artifactId> + </plugin> </plugins> </reporting> diff --git a/src/conf/spotbugs-exclude-filter.xml b/src/conf/spotbugs-exclude-filter.xml new file mode 100644 index 00000000..91f2df29 --- /dev/null +++ b/src/conf/spotbugs-exclude-filter.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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 + xmlns="https://github.com/spotbugs/filter/3.0.0" + 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"> + <!-- https://github.com/spotbugs/spotbugs/issues/2710 --> + <Match> + <Class name="~.*" /> + <Bug pattern="CT_CONSTRUCTOR_THROW" /> + </Match> + <Match> + <Class name="~.*" /> + <Bug pattern="EI_EXPOSE_REP" /> + </Match> + <Match> + <Class name="~.*" /> + <Bug pattern="EI_EXPOSE_REP2" /> + </Match> +</FindBugsFilter>