gradle
gradle copied to clipboard
Enable stricter validation of plugins by default for validatePlugins task
Gradle should strictly validate plugins written by plugin authors who have applied java-gradle-plugin plugin to their projects.
Expected Behavior
enableStricterValidation is set to true by default for ValidatePlugins tasks.
Current Behavior
Plugin authors have to know that this option exists, and enable it, to get all validations to run on their plugins. This means there are many plugins in the wild that do not get validated by default.
Context
I use Gradle plugins. I like it when they behave :)
This feature request is in the backlog of the relevant team but this area of Gradle is currently not a focus one so it might take a while before it gets implemented.
I'd be happy to create a PR? It seems a simple one to implement.
@akshayabd this might be an answer to my question about checking code.
@eskatos I would love to see this merged too, would a PR be accepted? Are there extra considerations other than changing the value and updating the migration guide?
Another option could be to remove stricter validation as a separate option, and make it the only option. The only difference this would make is that inputs on tasks not marked as @CacheableTask would still be validated for the presence of path normalization.
Thanks for the offer of PRs, but the difficulty is not so much in flipping this switch itself, but in how we handle the change. Flipping the switch directly would mean a breaking change for some plugins, and we don't do that in a minor version. I'd much rather use this opportunity to simplify things and remove the stricter validation option altogether, but that is not a simple change anymore.
Nag when false in 8.x, change default to true in 9, remove in 10?