Repository navigation
style: update google-java-format - #201
Conversation
Update spotless-maven-plugin (2.30.0 to 3.11.0), google-java-format (1.7 to 2.0.0, AOSP style), maven-checkstyle-plugin (3.3.1 to 3.6.0) and Checkstyle (9.3 to 14.4.0). They run on Java 21, so the CI job Lint does too, and the Java 8 notes in pom.xml, ci.yml, the README and docs/development.md are gone. Refs #163 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Only the output of ./mvnw spotless:apply, plus the author e-mail addresses in Javadoc escaped (< and >): Checkstyle 14 parses Javadoc and reports <name@host> as malformed HTML. Refs #163 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Refs #163 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideImplementationReformat application code with google-java-format 2.0.0 and escape author email addresses in Javadocs to satisfy Checkstyle 14.
Reformat integration-test source and escape the author email addresses in its Javadocs.
ConfigurationUpgrade the formatter and Checkstyle toolchain and run the CI lint job on Java 21.
DocumentationRemove the Java 8 formatter caveat and document that formatting and linting need Java 21.
TestsReformat test code with google-java-format 2.0.0 and escape author email addresses in test Javadocs.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #201 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 54 54
Lines 2351 2342 -9
Branches 275 274 -1
=========================================
- Hits 2351 2342 -9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Linked issuesChecked at commit 26b7a7c #163 style: update google-java-format · 2 of 4 met · 1 to check by hand
|
Co-authored-by: Claude Opus 5.5 <[email protected]>
Bring in #201 (google-java-format update), #202 and #206 (removal of the /v2/api-docs alias). Conflicts: - docs/upgrading.md: both PRs add items to "To 2.1.0"; the removal of /v2/api-docs goes first in the list of changes for all deployments. - KubernetesClientWrapper: #201 only reformatted the creator filter that this branch moved into listAllTaskmasterJobsForUser; kept the moved version. Files of this branch reformatted with spotless:apply for #201. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Moves formatting and linting to current tool versions, so that they run on Java 21 like the build:
pom.xml). These are the plugin versions of Dependabot's build(deps): bump the maven group across 1 directory with 4 updates #189; its remaining Maven 3.10.1 wrapper bump is left to Dependabot (a rebase of build(deps): bump the maven group across 1 directory with 4 updates #189 after this merge).Lintruns on Java 21 instead of Java 8.pom.xml,ci.yml,README.mdanddocs/development.md(including the advice to write code that Java 8 can parse)../mvnw spotless:apply: 32 files reformatted, and a stray};after two methods inTaskmasterEnvProperties.javabecomes}(one-line Javadoc expanded, blank lines between documented fields, lambdas on the line of their call, Javadoc rewrapped).spotless:applydidn't make:@author Ania Niewielska <[email protected]>becomes<[email protected]>in 36 files. Checkstyle 14 parses Javadoc (forUnusedImports) and reports the address as malformed HTML; it then also misses the imports used only in{@link}(2 false "unused import" findings). The rendered Javadoc is unchanged.After the merge, a follow-up PR adds the squash commit to
.git-blame-ignore-revs(as for #109).Closes #163
Verification
./mvnw spotless:applyon Java 21, then./mvnw spotless:check checkstyle:checkon Java 21: no changes left, 0 Checkstyle violations, BUILD SUCCESS../mvnw clean verifyineclipse-temurin:21-jdk: all unit and integration tests pass (142 integration tests), all coverage checks met, BUILD SUCCESS.git diff --word-diff -wof the reformat commit: only line breaks and indentation, plus the escaped author addresses.Linton Java 21,Test,Smoke test,Scan image,Docs, CodeQL, Codecov;CI passed).Declined review findings
.git-blame-ignore-revs(quality reviewer, medium; adversarial reviewer, low): the squash commit's SHA is only known after the merge, so it goes into a follow-up PR, as build: ignore the reformat in git blame #110 did for style: format the Java code #109.Co-Authored-Bytrailer (quality reviewer, low): it names the model that wrote them.Open questions
None.
🤖 Generated with Claude Code
Summary by Sourcery
Modernize formatting and linting tooling so the project’s code quality checks run consistently on Java 21.
Enhancements:
Build:
CI:
Documentation: