Skip to content

Commit

Permalink
Increase spotbugs checks
Browse files Browse the repository at this point in the history
Add spotbugs exclusions reported as part of the increased checks.
  • Loading branch information
MarkEWaite committed Jul 1, 2023
1 parent 10d085c commit bfeca7f
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<!-- https://stackoverflow.com/questions/12038238/unable-to-locate-source-xref-to-link-to -->
<linkXRef>false</linkXRef>
<spotbugs.effort>Max</spotbugs.effort>
<spotbugs.threshold>Medium</spotbugs.threshold>
<spotbugs.threshold>Low</spotbugs.threshold>
</properties>

<dependencyManagement>
Expand Down
77 changes: 77 additions & 0 deletions src/spotbugs/excludesFilter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter>
<!--
Exclusions in this section have been triaged and determined to be
false positives.
-->
<Match>
<Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE" />
<Class name="hudson.plugins.git.GitChangeSet" />
<Method name="getUser" />
</Match>
<Match>
<Bug pattern="MC_OVERRIDABLE_METHOD_CALL_IN_CONSTRUCTOR" />
<Or>
<Class name="hudson.plugins.git.GitChangeSetList" />
<Class name="hudson.plugins.git.GitSCM" />
</Or>
</Match>
<Match>
<Bug pattern="SE_NO_SERIALVERSIONID" />
<Or>
<Class name="hudson.plugins.git.ChangelogToBranchOptions" />
<Class name="hudson.plugins.git.GitPublisher$BranchToPush" />
<Class name="hudson.plugins.git.GitPublisher$NoteToPush" />
<Class name="hudson.plugins.git.GitPublisher$TagToPush" />
<Class name="hudson.plugins.git.GitSCM$BuildChooserContextImpl" />
<Class name="hudson.plugins.git.UserMergeOptions" />
<Class name="hudson.plugins.git.UserRemoteConfig" />
<Class name="hudson.plugins.git.browser.TFS2013GitRepositoryBrowser" />
<Class name="hudson.plugins.git.extensions.impl.SparseCheckoutPath$SparseCheckoutPathToPath" />
<Class name="hudson.plugins.git.util.DefaultBuildChooser" />
<Class name="jenkins.plugins.git.AbstractGitSCMSource$SCMRevisionImpl" />
<Class name="jenkins.plugins.git.AbstractGitSCMSource$SpecificRevisionBuildChooser" />
<Class name="jenkins.plugins.git.AbstractGitSCMSource$TelescopingSCMProbe" />
<Class name="jenkins.plugins.git.AbstractGitSCMSource$TreeWalkingSCMProbe" />
<Class name="jenkins.plugins.git.GitBranchSCMHead" />
<Class name="jenkins.plugins.git.GitBranchSCMRevision" />
<Class name="jenkins.plugins.git.GitRefSCMHead" />
<Class name="jenkins.plugins.git.GitRefSCMRevision" />
<Class name="jenkins.plugins.git.GitTagSCMHead" />
<Class name="jenkins.plugins.git.GitTagSCMRevision" />
</Or>
</Match>
<Match>
<!-- Ignoring in all cases because per class exclusion seemed to be ignored -->
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" />
</Match>
<Match>
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
<Class name="hudson.plugins.git.GitStatus$JenkinsAbstractProjectListener" />
<Method name="onNotifyCommit" />
</Match>
<Match>
<Bug pattern="UWF_NULL_FIELD" />
<Class name="hudson.plugins.git.SubmoduleConfig" />
<Field name="submoduleName" />
</Match>

<!--
Here lies technical debt. Exclusions in this section have not yet
been triaged. When working on this section, pick an exclusion to
triage, then:
- Add a @SuppressFBWarnings(value = "[...]", justification = "[...]")
annotation if it is a false positive. Indicate the reason why
it is a false positive, then remove the exclusion from this
section.
- If it is not a false positive, fix the bug, then remove the
exclusion from this section.
-->
<Match>
<Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS" />
<Class name="hudson.plugins.git.extensions.impl.PathRestriction" />
<Method name="normalize" />
</Match>
</FindBugsFilter>

0 comments on commit bfeca7f

Please sign in to comment.