Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use spotbugs 4.8.2 with more exclusions #8803

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions core/src/spotbugs/excludesFilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,125 @@
<Bug pattern="SF_SWITCH_NO_DEFAULT"/>
<Class name="hudson.scheduler.CrontabParser"/>
</Match>
<Match>
<!-- Preserve API compatibility -->
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.PluginManager"/>
<Field name="pluginUploaded"/>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.ProxyConfiguration"/>
<Field name="noProxyHost"/>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.cli.CLICommand"/>
<Or>
<Field name="locale"/>
<Field name="stderr"/>
<Field name="stdin"/>
<Field name="stdout"/>
</Or>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.cli.CopyJobCommand"/>
<Field name="dst"/>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.cli.CreateJobCommand"/>
<Field name="name"/>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.cli.SetBuildDescriptionCommand"/>
<Field name="description"/>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.cli.SetBuildDisplayNameCommand"/>
<Field name="displayName"/>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.model.Job"/>
<Field name="runIdMigrator"/>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.model.StringParameterValue"/>
<Field name="value"/>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.security.Permission"/>
<Field name="enabled"/>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.tasks.Maven"/>
<Field name="usePrivateRepository"/>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.util.Graph"/>
<Field name="defaultScale"/>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.widgets.HistoryWidget"/>
<Field name="baseList"/>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="jenkins.model.Jenkins"/>
<Or>
<Field name="tcpSlaveAgentListener"/>
<Field name="proxy"/>
<Field name="VERSION"/>
<Field name="CHANGELOG_URL"/>
<Field name="VERSION_HASH"/>
<Field name="SESSION_HASH"/>
<Field name="RESOURCE_PATH"/>
<Field name="VIEW_RESOURCE_PATH"/>
</Or>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="jenkins.widgets.HistoryPageFilter"/>
<Or>
<Field name="hasDownPage"/>
<Field name="hasUpPage"/>
<Field name="newestOnPage"/>
<Field name="nextBuildNumber"/>
<Field name="oldestOnPage"/>
</Or>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE"/>
<Class name="hudson.slaves.JNLPLauncher"/>
<Field name="tunnel"/>
</Match>
<Match>
<!-- Reserved for future use -->
<Bug pattern="SS_SHOULD_BE_STATIC"/>
<Class name="hudson.model.User"/>
<Field name="version"/>
</Match>
<Match>
<!-- Reserved for future use -->
<Bug pattern="SS_SHOULD_BE_STATIC"/>
<Class name="hudson.model.UserIdMapper"/>
<Field name="version"/>
</Match>
<Match>
<!-- Reserved for future use -->
<Bug pattern="SS_SHOULD_BE_STATIC"/>
<Class name="hudson.util.Graph"/>
<Field name="defaultScale"/>
</Match>
<!--
Here lies technical debt. Exclusions in this section have not yet been triaged. When working on
on this section, pick an exclusion to triage, then:
Expand Down Expand Up @@ -377,4 +496,8 @@
</And>
</Or>
</Match>
<Match>
<Bug pattern="SIC_INNER_SHOULD_BE_STATIC"/>
<Class name="jenkins.security.stapler.StaplerDispatchValidator$ValidatorCache$Validator"/>
</Match>
</FindBugsFilter>
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ THE SOFTWARE.
<!-- Minimum Remoting version, which is tested for API compatibility -->
<remoting.minimum.supported.version>4.13</remoting.minimum.supported.version>

<!-- TODO: Remove when parent pom is using this version or newer -->
<!-- https://github.com/jenkinsci/pom/pull/510 -->
<spotbugs-maven-plugin.version>4.8.2.0</spotbugs-maven-plugin.version>
<spotbugs.effort>Max</spotbugs.effort>
<spotbugs.omitVisitors>FindReturnRef,ConstructorThrow</spotbugs.omitVisitors>
<spotbugs.threshold>Medium</spotbugs.threshold>

<access-modifier.version>1.33</access-modifier.version>
Expand Down
Loading