Skip to content

Commit bfeca7f

Browse files
committed
Increase spotbugs checks
Add spotbugs exclusions reported as part of the increased checks.
1 parent 10d085c commit bfeca7f

File tree

2 files changed

+78
-1
lines changed

2 files changed

+78
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
<!-- https://stackoverflow.com/questions/12038238/unable-to-locate-source-xref-to-link-to -->
8181
<linkXRef>false</linkXRef>
8282
<spotbugs.effort>Max</spotbugs.effort>
83-
<spotbugs.threshold>Medium</spotbugs.threshold>
83+
<spotbugs.threshold>Low</spotbugs.threshold>
8484
</properties>
8585

8686
<dependencyManagement>

src/spotbugs/excludesFilter.xml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<FindBugsFilter>
3+
<!--
4+
Exclusions in this section have been triaged and determined to be
5+
false positives.
6+
-->
7+
<Match>
8+
<Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE" />
9+
<Class name="hudson.plugins.git.GitChangeSet" />
10+
<Method name="getUser" />
11+
</Match>
12+
<Match>
13+
<Bug pattern="MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR" />
14+
<Or>
15+
<Class name="hudson.plugins.git.GitChangeSetList" />
16+
<Class name="hudson.plugins.git.GitSCM" />
17+
</Or>
18+
</Match>
19+
<Match>
20+
<Bug pattern="SE_NO_SERIALVERSIONID" />
21+
<Or>
22+
<Class name="hudson.plugins.git.ChangelogToBranchOptions" />
23+
<Class name="hudson.plugins.git.GitPublisher$BranchToPush" />
24+
<Class name="hudson.plugins.git.GitPublisher$NoteToPush" />
25+
<Class name="hudson.plugins.git.GitPublisher$TagToPush" />
26+
<Class name="hudson.plugins.git.GitSCM$BuildChooserContextImpl" />
27+
<Class name="hudson.plugins.git.UserMergeOptions" />
28+
<Class name="hudson.plugins.git.UserRemoteConfig" />
29+
<Class name="hudson.plugins.git.browser.TFS2013GitRepositoryBrowser" />
30+
<Class name="hudson.plugins.git.extensions.impl.SparseCheckoutPath$SparseCheckoutPathToPath" />
31+
<Class name="hudson.plugins.git.util.DefaultBuildChooser" />
32+
<Class name="jenkins.plugins.git.AbstractGitSCMSource$SCMRevisionImpl" />
33+
<Class name="jenkins.plugins.git.AbstractGitSCMSource$SpecificRevisionBuildChooser" />
34+
<Class name="jenkins.plugins.git.AbstractGitSCMSource$TelescopingSCMProbe" />
35+
<Class name="jenkins.plugins.git.AbstractGitSCMSource$TreeWalkingSCMProbe" />
36+
<Class name="jenkins.plugins.git.GitBranchSCMHead" />
37+
<Class name="jenkins.plugins.git.GitBranchSCMRevision" />
38+
<Class name="jenkins.plugins.git.GitRefSCMHead" />
39+
<Class name="jenkins.plugins.git.GitRefSCMRevision" />
40+
<Class name="jenkins.plugins.git.GitTagSCMHead" />
41+
<Class name="jenkins.plugins.git.GitTagSCMRevision" />
42+
</Or>
43+
</Match>
44+
<Match>
45+
<!-- Ignoring in all cases because per class exclusion seemed to be ignored -->
46+
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" />
47+
</Match>
48+
<Match>
49+
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
50+
<Class name="hudson.plugins.git.GitStatus$JenkinsAbstractProjectListener" />
51+
<Method name="onNotifyCommit" />
52+
</Match>
53+
<Match>
54+
<Bug pattern="UWF_NULL_FIELD" />
55+
<Class name="hudson.plugins.git.SubmoduleConfig" />
56+
<Field name="submoduleName" />
57+
</Match>
58+
59+
<!--
60+
Here lies technical debt. Exclusions in this section have not yet
61+
been triaged. When working on this section, pick an exclusion to
62+
triage, then:
63+
64+
- Add a @SuppressFBWarnings(value = "[...]", justification = "[...]")
65+
annotation if it is a false positive. Indicate the reason why
66+
it is a false positive, then remove the exclusion from this
67+
section.
68+
69+
- If it is not a false positive, fix the bug, then remove the
70+
exclusion from this section.
71+
-->
72+
<Match>
73+
<Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS" />
74+
<Class name="hudson.plugins.git.extensions.impl.PathRestriction" />
75+
<Method name="normalize" />
76+
</Match>
77+
</FindBugsFilter>

0 commit comments

Comments
 (0)