Add Spotless Maven plugin for code formatting#10
Merged
kevinherron merged 2 commits intomasterfrom Dec 30, 2025
Merged
Conversation
- Update GitHub Actions workflows to use JDK 17 - Add maven-toolchains-plugin to use JDK 17 for build - Add maven-compiler-plugin with release flag for JDK 11 target - Add spotless-maven-plugin with Google Java Format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem(s) was I solving?
The project lacked automated code formatting, which can lead to inconsistent code style across contributions and make code reviews more tedious due to style-related changes mixed with logical changes.
Additionally, the build was using JDK 11 in CI, but the Spotless Maven plugin (v3.0.0) requires JDK 17 to run.
What user-facing changes did I ship?
No user-facing changes. This is a developer tooling improvement.
How I implemented it
mvn spotless:applyThe build now:
--release 11to ensure JDK 11 compatibilityspotless:checkduring the build to enforce formattingHow to verify it
Manual Testing
mvn clean verifypassesDescription for the changelog
Add Spotless Maven plugin with Google Java Format for automated code formatting. Build now requires JDK 17 via toolchains while maintaining JDK 11 target compatibility.