Revert "Migrate CPS to Spring-boot 3.0"
[cps.git] / spotbugs / src / main / resources / spotbugs-exclude.xml
1 <!--
2   ============LICENSE_START=======================================================
3   Copyright (c) 2021 Pantheon.tech.
4   Modifications Copyright (C) 2021 Bell Canada.
5   ================================================================================
6   Licensed under the Apache License, Version 2.0 (the "License");
7   you may not use this file except in compliance with the License.
8   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   ============LICENSE_END=========================================================
18 -->
19
20 <FindBugsFilter>
21   <Match>
22     <!-- Ignore generated code -->
23     <Source name="~.*generated-sources.*.java"/>
24   </Match>
25   <Match>
26     <Or>
27       <!-- Anonymous inner classes are very common. -->
28       <Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" />
29
30       <!-- We use static slf4j Logger (this rule is from KengoTODA/findbugs-slf4j jp.skypencil.findbugs.slf4:bug-pattern) -->
31       <Bug pattern="SLF4J_LOGGER_SHOULD_BE_NON_STATIC" />
32
33       <!-- Guava 25.1+ uses the Checker Framework's @Nullable which SpotBugs doesn't handle correctly, even though it's
34            supposed to; see https://github.com/spotbugs/spotbugs/issues/743 -->
35       <Bug pattern="NP_NONNULL_PARAM_VIOLATION" />
36       <Bug pattern="NP_NULL_PARAM_DEREF" />
37       <Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE" />
38       <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" />
39
40       <!-- https://stackoverflow.com/a/34674776. Doesn't detect Lombok All Args Constructor variables being used with map get key and value, which can lead to spotbugs being detected
41       on used fields -->
42       <Bug pattern="URF_UNREAD_FIELD"/>
43
44       <!-- https://github.com/spotbugs/spotbugs/issues/511. Strict reading of Object.equals() contract means that
45            evenever equals() behaviour is defined, all implementations need to adhere to it. The only reason
46            to override the method (assuming correct API design, of course) is to provide a more efficient
47            implementation. This rule would be forcing a @SuppressFBWarnings on perfectly compliant classes. -->
48       <Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS"/>
49
50       <!-- https://github.com/spotbugs/spotbugs/issues/756. spotbugs does not grok Java 11's try-with-resources -->
51       <Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"/>
52       <Bug pattern="EI_EXPOSE_REP"/>
53       <Bug pattern="EI_EXPOSE_REP2"/>
54     </Or>
55   </Match>
56
57 </FindBugsFilter>