salesforce / utam-java

UTAM Java implementation
MIT License
25 stars 16 forks source link

chore: add spotless formatting to the build and apply it #204

Closed AdamTReineke closed 8 months ago

AdamTReineke commented 9 months ago

Add Spotless to the build to check and apply the Google code style.

During the Maven clean phase, spotless:check is called. This makes PRs fail quickly if somehow code was submitted without formatting. This generally shouldn't hit affect dev workflows, though they can resolve any errors by running mvn validate or manually calling mvn spotless:apply and then doing the clean again.

During the Maven validate phase, spotless:apply is called. This keeps local code formatted as expected throughout the dev process. (In VS Code as I was testing this, it was making it hard to actually keep unformatted files on disk at all!)

For code review, please notice the 3 commits are meaningful:

To QA: