Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 975 Bytes

File metadata and controls

27 lines (18 loc) · 975 Bytes

Code Formatting

Java Formatting

Java Code is formatted using the Google Java Style Guide. We use spotless to check and fix formatting on files changed by the branch. It will run on build and CI will check that it's been run.

We recommend adding the pre-push hook to check formatting before pushing to GitHub.

./gradlew spotlessInstallGitPrePushHook

Running Formatting

To check if the code is formatted correctly:

./gradlew spotlessCheck

To fix the code formatting (also runs on build):

./gradlew spotlessApply

Editor Setup

While the spotless formatting is the source of truth for what is correct. You can set up your editor to directly use the google-java-format so functions like format on save are available.