blob: 059b560691deae0042d51d4d9cc878374b7ffa27 [file] [log] [blame]
Bruno Sakotof549c7c2021-05-18 16:02:30 -04001<!--
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
Claudio David Gasparini9f93f792020-12-18 14:37:27 +010020<FindBugsFilter>
21 <Match>
Bruno Sakotof549c7c2021-05-18 16:02:30 -040022 <!-- Ignore generated code -->
23 <Source name="~.*generated-sources.*.java"/>
ToineSiebelinkc37678a2021-05-20 16:44:21 +010024 </Match>
25 <Match>
Claudio David Gasparini9f93f792020-12-18 14:37:27 +010026 <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://github.com/spotbugs/spotbugs/issues/511. Strict reading of Object.equals() contract means that
41 evenever equals() behaviour is defined, all implementations need to adhere to it. The only reason
42 to override the method (assuming correct API design, of course) is to provide a more efficient
43 implementation. This rule would be forcing a @SuppressFBWarnings on perfectly compliant classes. -->
44 <Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS"/>
45
46 <!-- https://github.com/spotbugs/spotbugs/issues/756. spotbugs does not grok Java 11's try-with-resources -->
47 <Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"/>
48 </Or>
49 </Match>
Bruno Sakotof549c7c2021-05-18 16:02:30 -040050
Claudio David Gasparini9f93f792020-12-18 14:37:27 +010051</FindBugsFilter>