Skip to content

Commit

Permalink
RAT-369: Tweak config and add exclusion files in submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
ottlinger committed Apr 21, 2024
1 parent d929953 commit 39cb8b1
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 1 deletion.
27 changes: 27 additions & 0 deletions apache-rat-core/spotbugs_ignore.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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>
<Match>
<!-- Uses tryWithResources, thus closes resource properly:
[ERROR] Medium: org.apache.rat.configuration.builders.ChildContainerBuilder.setResource(String) may fail to close stream
[org.apache.rat.configuration.builders.ChildContainerBuilder] At ChildContainerBuilder.java:[line 62] OS_OPEN_STREAM
-->
<Class name="org.apache.rat.configuration.builders.ChildContainerBuilder"/>
<Bug pattern="OS_OPEN_STREAM"/>
</Match>
</FindBugsFilter>
27 changes: 27 additions & 0 deletions apache-rat-plugin/spotbugs_ignore.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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>
<Match>
<!-- Uses tryWithResources, thus closes resource properly:
[ERROR] Medium: org.apache.rat.configuration.builders.ChildContainerBuilder.setResource(String) may fail to close stream
[org.apache.rat.configuration.builders.ChildContainerBuilder] At ChildContainerBuilder.java:[line 62] OS_OPEN_STREAM
-->
<Class name="org.apache.rat.configuration.builders.ChildContainerBuilder"/>
<Bug pattern="OS_OPEN_STREAM"/>
</Match>
</FindBugsFilter>
27 changes: 27 additions & 0 deletions apache-rat-tasks/spotbugs_ignore.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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>
<Match>
<!-- Uses tryWithResources, thus closes resource properly:
[ERROR] Medium: org.apache.rat.configuration.builders.ChildContainerBuilder.setResource(String) may fail to close stream
[org.apache.rat.configuration.builders.ChildContainerBuilder] At ChildContainerBuilder.java:[line 62] OS_OPEN_STREAM
-->
<Class name="org.apache.rat.configuration.builders.ChildContainerBuilder"/>
<Bug pattern="OS_OPEN_STREAM"/>
</Match>
</FindBugsFilter>
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,9 @@ agnostic home for software distribution comprehension and audit tools.
<configuration>
<!-- TODO remove after RAT-369 is done -->
<failOnError>false</failOnError>
<excludeFilterFile>spotbugs-ignore.xml</excludeFilterFile>
<!-- we only want to see our own problems -->
<onlyAnalyze>org.apache.rat.*</onlyAnalyze>
<excludeFilterFile>${basedir}/spotbugs_ignore.xml</excludeFilterFile>
<plugins>
<plugin>
<groupId>com.h3xstream.findsecbugs</groupId>
Expand Down

0 comments on commit 39cb8b1

Please sign in to comment.