spotbugs / spotbugs-gradle-plugin

https://plugins.gradle.org/plugin/com.github.spotbugs
Apache License 2.0
180 stars 68 forks source link

SpotbugsTask is considered up-to-date after adding a spotbugsPlugins dependency #604

Open jochenberger opened 3 years ago

jochenberger commented 3 years ago

If I add a spotbugs plugin (e.g. spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.11.0') and run the spotbugsMain task, it is considered up-to-date. The plugins should be considered for the up-to-date check. Please let me know if any more information is needed.

davidburstromspotify commented 2 years ago

I just came across this issue too. It looks like a problem is that the task input is marked as internal:

https://github.com/spotbugs/spotbugs-gradle-plugin/blob/ba591fbb3d8016c28bb2e6d7231087e286cccc8a/src/main/groovy/com/github/spotbugs/snom/SpotBugsTask.groovy#L447

Vampire commented 1 year ago

Yep, should probably be @Classpath instead.

And the same for spotbugsClasspath. If you have the html report enabled and use a built-in stylesheet, the task will be out-of-date because the stylesheet property changed. But if you either have a custom stylesheet or do not have the html report enabled, the tasks are up-to-date or served from cache even if the spotbugs version is changed.