rewrite-gradle-plugin icon indicating copy to clipboard operation
rewrite-gradle-plugin copied to clipboard

Enable auto discovery of Checkstyle config file via gradle plugin

Open blipper opened this issue 1 year ago • 0 comments

What problem are you trying to solve?

Easy of configuration for initial users

Describe the solution you'd like

https://github.com/openrewrite/rewrite-gradle-plugin/blob/459570d8ec7cc874df8802bb3d326b3d3446047e/plugin/src/main/java/org/openrewrite/gradle/isolated/DefaultProjectParser.java#L1340-L1353 has the code to load checkfile config files.

It would be great if the plugin could A) detect if the checkstyle plugin was loaded B) at task execution time us the configFile value automatically from https://docs.gradle.org/current/dsl/org.gradle.api.plugins.quality.CheckstyleExtension.html#org.gradle.api.plugins.quality.CheckstyleExtension:configFile

Have you considered any alternatives or workarounds?

You can manually configure this but non-obvious.

Additional context

Are you interested in contributing this feature to OpenRewrite?

blipper avatar Oct 11 '24 23:10 blipper