google-java-format icon indicating copy to clipboard operation
google-java-format copied to clipboard

[core] add IDE agnostic configuration thus run `spotlessApply` on dev environment

Open Pankraz76 opened this issue 6 months ago • 2 comments

Automating Code Formatting with Spotless in Gradle

By binding the spotlessApply goal to local execution, we can automatically fix formatting issues during a single Gradle build when triggered for every push. This approach offers two key benefits:

  1. Time savings: Eliminates back-and-forth CI/CD cycles for formatting fixes
  2. Resource efficiency: Reduces cloud compute usage

This pattern is already well-established in major projects:

Current Limitations and Proof of Concept

While the concept is proven in Maven environments, Gradle/Spotless integration currently requires additional configuration:

Example of formatting workflow

Pankraz76 avatar Jun 27 '25 21:06 Pankraz76

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Jun 27 '25 21:06 google-cla[bot]

google seems dead.

Agreement Name Date Signed Manage Google Individual CLA vincent potucek Jun 27, 2025 05:50 PDT Edit Contact Information

Pankraz76 avatar Jul 04 '25 09:07 Pankraz76