Skip to content

build(server): migrate Java formatting to Spotless - #1541

Merged
FelixTJDietrich merged 3 commits into
mainfrom
1464-java-formatting-migration
Aug 28, 2026
Merged

build(server): migrate Java formatting to Spotless#1541
FelixTJDietrich merged 3 commits into
mainfrom
1464-java-formatting-migration

Conversation

@FelixTJDietrich

@FelixTJDietrich FelixTJDietrich commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Description

Migrates Java formatting from prettier-plugin-java to Maven-native Spotless with Palantir Java Format. This removes Java's Node-based formatting path, keeps generated clients outside the formatter scope, and makes Maven verify enforce the complete handwritten application tree.

This builds on #1529, which introduced the application/generated-client module boundary and has now merged.

What changed

  • pins Spotless 3.10.1 and Palantir Java Format 2.97.0 in Maven;
  • binds spotless:check to Maven verify for application main and test sources;
  • explicitly stores Spotless's local timestamp index at application/target/spotless-index;
  • preserves the public pnpm run format, format:check, and check commands;
  • removes the Java Prettier plugin, its configuration, and the now-unused process wrapper;
  • documents the canonical commands and official IntelliJ/Eclipse integrations;
  • reformats 2,413 handwritten Java files in a separate mechanical commit; and
  • records that mechanical commit in .git-blame-ignore-revs.

Generated clients are excluded structurally by configuring Spotless only in the application module. No import sorting, unused-import removal, ratcheting, or semantic cleanup is included.

Performance

On the same warm local checkout used for the migration audit:

Check Before After
Java formatting 28.78 s 3.02 s
Complete pnpm run check 53.18 s 34.25 s

The warm Spotless check used its explicit local index. CI does not cache that index.

Fixes #1464

How to test

  • pnpm run format
  • pnpm run check
  • pnpm run test:server:unit — 6,784 tests passed
  • ran spotless:apply twice and confirmed the second run was byte-idempotent
  • planted a Java formatting violation and confirmed both spotless:check and Maven verify rejected it
  • confirmed the existing Unicode/NUL fixtures format successfully
  • compared generated-client Java hashes before and after formatting; they were unchanged

Checklist

  • The changeset is intentionally empty because this changes development and CI tooling only.
  • No operator action or migration is required.

@FelixTJDietrich
FelixTJDietrich requested a review from a team as a code owner August 27, 2026 23:22
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bbe6149b-c1e7-4ea9-a937-3b964b26730f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@FelixTJDietrich
FelixTJDietrich force-pushed the 1464-java-formatting-migration branch from 44b9174 to 5cbd076 Compare August 27, 2026 23:24
@FelixTJDietrich
FelixTJDietrich changed the base branch from 1527-server-verification-hardening to main August 27, 2026 23:24
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Caution

CodeRabbit couldn't update its existing comment. The review summary may be out of date.

Error details
Validation Failed: {"resource":"IssueComment","code":"custom","field":"body","message":"body is too long (maximum is 65536 characters)"} - https://docs.github.com/rest/issues/comments#update-an-issue-comment

1 similar comment
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Caution

CodeRabbit couldn't update its existing comment. The review summary may be out of date.

Error details
Validation Failed: {"resource":"IssueComment","code":"custom","field":"body","message":"body is too long (maximum is 65536 characters)"} - https://docs.github.com/rest/issues/comments#update-an-issue-comment

Comment thread server/application/src/main/java/de/tum/cit/aet/hephaestus/SecurityConfig.java Dismissed
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

📚 Documentation Preview

Preview has been removed (PR closed)

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Caution

CodeRabbit couldn't update its existing comment. The review summary may be out of date.

Error details
Validation Failed: {"resource":"IssueComment","code":"custom","field":"body","message":"body is too long (maximum is 65536 characters)"} - https://docs.github.com/rest/issues/comments#update-an-issue-comment

@FelixTJDietrich
FelixTJDietrich force-pushed the 1464-java-formatting-migration branch from e9a2c33 to 5cbd076 Compare August 28, 2026 06:40
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Caution

CodeRabbit couldn't update its existing comment. The review summary may be out of date.

Error details
Validation Failed: {"resource":"IssueComment","code":"custom","field":"body","message":"body is too long (maximum is 65536 characters)"} - https://docs.github.com/rest/issues/comments#update-an-issue-comment

@FelixTJDietrich
FelixTJDietrich force-pushed the 1464-java-formatting-migration branch from 5cbd076 to a4c1ea0 Compare August 28, 2026 06:54
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Caution

CodeRabbit couldn't update its existing comment. The review summary may be out of date.

Error details
Validation Failed: {"resource":"IssueComment","code":"custom","field":"body","message":"body is too long (maximum is 65536 characters)"} - https://docs.github.com/rest/issues/comments#update-an-issue-comment

@FelixTJDietrich
FelixTJDietrich merged commit b62e059 into main Aug 28, 2026
38 of 39 checks passed
@FelixTJDietrich
FelixTJDietrich deleted the 1464-java-formatting-migration branch August 28, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

build(java): migrate Java formatting to Spotless and palantir-java-format

2 participants