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

Conversation

MarkEWaite
Copy link
Contributor

@MarkEWaite MarkEWaite commented Dec 24, 2023

Use spotbugs plugin 4.8.2.0 with additional suppressions

The parent pom spotbugs pull request needs this change along with the changes in other repositories that use the Jenkins parent pom.

jenkinsci/pom#501 (review) recommends that the new spotbugs issues be either suppressed or resolved in the upstream release of spotbugs. This change suppresses the new warning for primitive fields that are publicly visible and the new warning for a few cases where a field could be made static.

This change skips the warnings related to CT_CONSTRUCTOR_THROWS because they are not relevant to Jenkins. jenkinsci/plugin-pom#869 (comment) provides more details along with the discussion at spotbugs/spotbugs#2695

The changes to pom.xml are flagged so that they can be removed when the other repositories that consume the parent pom have been verified that they will be able to use spotbugs plugin 4.8.2.0 without additional noise.

Additional pull requests that have been merged include:

The additional repositories that have been reviewed and confirmed they are ready for the parent pom update to use spotbugs 4.8.2 include:

Testing done

Confirmed that automated tests pass on my Linux computer with Java 21.

Proposed changelog entries

N/A

Proposed upgrade guidelines

N/A

Submitter checklist

Before the changes are marked as ready-for-merge:

Maintainer checklist

@MarkEWaite MarkEWaite added the skip-changelog Should not be shown in the changelog label Dec 24, 2023
MarkEWaite added a commit to MarkEWaite/bridge-method-injector that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/extensibility-api that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/jellydoc-maven-plugin that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/jenkins-test-harness-htmlunit that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/lib-access-modifier that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/lib-annotation-indexer that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/lib-crypto-util that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/lib-file-leak-detector that referenced this pull request Dec 24, 2023
Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Needs to be merged on or before the update of the parent pom that
updates to use spotbugs 4.8.2.
MarkEWaite added a commit to MarkEWaite/lib-mock-javamail that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/lib-process-utils that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/lib-support-log-formatter that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/lib-symbol-annotation that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/lib-task-reactor that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
@MarkEWaite MarkEWaite changed the title Use spotbugs plugin 4.8.2.0 with additional suppressions Use spotbugs 4.8.2.0 with more suppressions Dec 24, 2023
MarkEWaite added a commit to MarkEWaite/maven-hpi-plugin that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/plugin-compat-tester that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/plugin-installation-manager-tool that referenced this pull request Dec 24, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/remoting that referenced this pull request Dec 24, 2023
Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Needs to be merged on or before the update of the parent pom that updates to use spotbugs 4.8.2.
MarkEWaite added a commit to MarkEWaite/stapler-maven-plugin that referenced this pull request Dec 25, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/stapler that referenced this pull request Dec 25, 2023
MarkEWaite added a commit to MarkEWaite/winp that referenced this pull request Dec 25, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to MarkEWaite/winstone that referenced this pull request Dec 25, 2023
Draft, not intended to be merged

Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Does not need to be merged because there is no additional suppression required.
MarkEWaite added a commit to jenkinsci/lib-file-leak-detector that referenced this pull request Dec 25, 2023
Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Needs to be merged on or before the update of the parent pom that
updates to use spotbugs 4.8.2.
jenkinsci/pom#510 needs this change along with
checks of the other repositories that use the Jenkins parent pom.

jenkinsci/pom#501 (review)
recommends that the new spotbugs issues be either suppressed or resolved
in the upstream release of spotbugs.  This change suppresses the new
warning for primitive fields that are pu9blicly visible and the new
warning for a few cases where a field could be made static.

This change skips the warnings related to CT_CONSTRUCTOR_THROWS because
they are not relevant to Jenkins.

jenkinsci/plugin-pom#869 (comment)
provides more details along with the discussion at
spotbugs/spotbugs#2695
MarkEWaite added a commit to jenkinsci/remoting that referenced this pull request Jan 1, 2024
Prep for

* jenkinsci/pom#510

Part of the checklist in:

* jenkinsci/jenkins#8803

Needs to be merged on or before the update of the parent pom that updates to use spotbugs 4.8.2.
MarkEWaite added a commit to jenkinsci/stapler that referenced this pull request Jan 1, 2024
@timja timja merged commit 81c3249 into jenkinsci:master Jan 2, 2024
17 checks passed
@MarkEWaite MarkEWaite deleted the use-spotbugs-4.8.2.0 branch January 2, 2024 23:01
MarkEWaite added a commit to MarkEWaite/jenkins that referenced this pull request Jan 10, 2024
Removes the 81c3249 workaround that
was added in pull request jenkinsci#8803
MarkEWaite added a commit that referenced this pull request Jan 13, 2024
Rely on spotbugs configuration from parent pom

Removes the 81c3249 workaround that
was added in pull request #8803
MarkEWaite added a commit to MarkEWaite/jacoco-plugin that referenced this pull request Oct 9, 2024
https://www.jenkins.io/doc/developer/tutorial-improve/add-more-spotbugs-checks/
describes the technique used here with an exclusions file.  The specific
exclusion for PA_PUBLIC_PRIMITIVE_ATTRIBUTE has been confirmed by Jenkins
developers that it is not helpful in a Jenkins plugin.

jenkinsci/jenkins#8803 describes the changes
that were made in Jenkins core and in many Jenkins plugins to suppress
the PA_PUBLIC_PRIMITIVE_ATTRIBUTE spotbugs warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Should not be shown in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants