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

Remove duplicate SpotBugs defaults #333

Merged
merged 2 commits into from
Nov 2, 2022
Merged

Conversation

basil
Copy link
Member

@basil basil commented Nov 2, 2022

The version of the SpotBugs Maven Plugin that we are using already defines the failOnError, effort, threshold, and excludeFilterFile mojo parameters to the values of the spotbugs.failOnError, spotbugs.threshold, spotbugs.effort, or spotbugs.excludeFilterFile properties if set, with the same defaults as ours if these properties are not set (see https://github.com/spotbugs/spotbugs-maven-plugin/blob/f01a7f6b99da3d2e6dcdbddd20f0b4e4dfac73fa/src/main/groovy/org/codehaus/mojo/spotbugs/BaseViolationCheckMojo.groovy). As such it is completely redundant to declare these defaults ourselves and configure the mojo with them. To test this, I compiled the Swarm client with these changes and observed that the spotbugs.excludeFilterFile and spotbugs.threshold settings still took effect with the changes in this PR.

@basil basil added the internal label Nov 2, 2022
@basil basil requested a review from timja November 2, 2022 22:29
@basil basil merged commit 84e3d78 into jenkinsci:master Nov 2, 2022
@basil basil deleted the spotbugs-defaults branch November 2, 2022 22:48
MarkEWaite added a commit to MarkEWaite/jenkins.io that referenced this pull request Nov 4, 2022
The spotbugs excludes filter file is now enabled automatically if a file
with the correct name is found.  There is no longer any need to add the
entry into the pom.xml file.

See https://github.com/jenkinsci/pom/releases/tag/jenkins-1.91 and
jenkinsci/pom#333
MarkEWaite added a commit to jenkins-infra/jenkins.io that referenced this pull request Nov 4, 2022
The spotbugs excludes filter file is now enabled automatically if a file
with the correct name is found.  There is no longer any need to add the
entry into the pom.xml file.

See https://github.com/jenkinsci/pom/releases/tag/jenkins-1.91 and
jenkinsci/pom#333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants