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

Request: add an option so that spotbugs tasks aren't automatically added to the check task #1303

Closed
staktrace opened this issue Jan 7, 2025 · 3 comments · Fixed by #1304
Closed
Labels

Comments

@staktrace
Copy link
Contributor

In some cases we may want to run the spotbugs tasks separately from check. I realize that we can do this with gradle check -x spotbugsMain but it can be a bit cumbersome to do it this way particularly when there are multiple spotbugs tasks. Many linting/formatting plugins provide an option which, when set, prevents the plugins from automatically adding the tasks as dependencies of check. Would you accept a PR that does this? The default behaviour would remain unchanged.

@hazendaz
Copy link
Member

hazendaz commented Jan 8, 2025

This sounds like something that was done with the maven plugin some time ago. We are always welcome for pull requests. If it looks acceptable for usage, it will get merged. Releases are also somewhat regular.

staktrace added a commit to staktrace/spotbugs-gradle-plugin that referenced this issue Jan 8, 2025
The new runOnCheck extension property (defaults to true) can be
set to false, which disables the dependency from the `check` task
to the spotbugs tasks. This is useful in cases where consumers
do not want it to run automatically as part of `gradle check` but
will run it in a separate context.

Fixes spotbugs#1303
staktrace added a commit to staktrace/spotbugs-gradle-plugin that referenced this issue Jan 8, 2025
The new runOnCheck extension property (defaults to true) can be
set to false, which disables the dependency from the `check` task
to the spotbugs tasks. This is useful in cases where consumers
do not want it to run automatically as part of `gradle check` but
will run it in a separate context.

Fixes spotbugs#1303
@staktrace
Copy link
Contributor Author

Thanks for the quick response! I've put up a PR at #1304, please take a look.

staktrace added a commit to staktrace/spotbugs-gradle-plugin that referenced this issue Jan 10, 2025
The new runOnCheck extension property (defaults to true) can be
set to false, which disables the dependency from the `check` task
to the spotbugs tasks. This is useful in cases where consumers
do not want it to run automatically as part of `gradle check` but
will run it in a separate context.

Fixes spotbugs#1303
Copy link

🎉 This issue has been resolved in version 6.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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 a pull request may close this issue.

2 participants