spotbugs / spotbugs-gradle-plugin

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

Maybe consider renaming spotbugsMain to spotbugs? #112

Open Vampire opened 5 years ago

Vampire commented 5 years ago

For most standard Gradle plugins, the Main is left out for the main source set in task names, like compileJava vs. compileTestJava or compileOtherSourceSetJava and so on. Maybe it would make sense to follow suit and also name the SpotBugs task for the main source set just spotbugs? Just an idea, if you don't like it, just close it. :-)

KengoTODA commented 5 years ago

Really interesting, if we can handle backward compatibility well, it should be nice. :)

Vampire commented 5 years ago

Well, you could rename the task to spotbugs, then add a simple no-op task called spotbugsMain that depends on spotbugs and emits a deprecation warning, then at some point remove it. Alternatively to catch the guys that read no warnings and / or have it in some scripts as an intermediary step between deprecation warning and removal make the task fail the build so that a meaningful error message can be given and then later on remove it.

Vampire commented 5 years ago

Hm, actually I'm unsure now. The standard code quality plugins shipped with Gradle like codenarc, pmd, findbugs or jdepend all follow the ´blaMain` convention. :-/ I'll open a ticket to Gradle first to see what they think about it. I'll probably tend to staying in-line with the standard CQ plugins if they don't change it.

Vampire commented 5 years ago

https://github.com/gradle/gradle/issues/8542

KengoTODA commented 5 years ago

It seems that the discussion at that issue is still in progress, so I removed milestone from this issue.