Closed SaptarshiSarkar12 closed 7 months ago
@SaptarshiSarkar12 Thanks for getting in touch. The idea of having checkstyle
is to help contributors prepare a PR that complies with the formatting rules of the project (and not only formatting rules I would say) and in general learn the project's code. In addition, having the correct formatting in place, when reviewing PRs, is in great help for the maintainers. I do not think that having a CI that does the formatting afterwards is the ways we would like to go.
@violetagg Okay. Got it. Thank you :grin:!
Motivation
This project has a code style defined in
checkstyle.xml
file in thecodequality
directory. Checking whether the code in the Pull Requests or branches follows the project's code style and applying fixes accordingly is a tedious work.Desired solution
I want to use
OpenRewrite's Gradle Plugin
to automatically format the Java files using the Checkstyle configuration. I would also like to create a GitHub Actions to automatically run the formatter and push the changes to the branches or the PRs.Additional context
I have implemented this feature in an Open-Source project - Drifty and the GitHub Action also pushes the formatted files to the branches or PRs as you can see below :point_down: If this issue seems good to the maintainers and adds some value to the project, then, I would like to work on this issue.