reactor / reactor-netty

TCP/HTTP/UDP/QUIC client/server with Reactor over Netty

Home Page:https://projectreactor.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CI: Add GitHub Actions to Auto-Format Java Files according to Checkstyle configuration

SaptarshiSarkar12 opened this issue · comments

Motivation

This project has a code style defined in checkstyle.xml file in the codequality 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 👇
Screenshot from 2023-11-25 08-22-24
If this issue seems good to the maintainers and adds some value to the project, then, I would like to work on this issue.

@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 😁!