Align Java formatting with shared just recipes - #2586
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The commands match the Maven configuration and existing CI enforcement.
Review tier: Balanced
Findings: None
What changed in this PR
Aligns Java formatting and linting with shared repository just workflows while removing the unreliable pre-commit hook.
Changes:
- Adds Java to aggregate formatting and linting recipes.
- Documents
justand equivalent Maven commands. - Removes pre-commit hook installation and implementation.
| File | Description |
|---|---|
justfile |
Adds Java format and lint recipes. |
java/README.md |
Documents Java formatting and linting. |
.github/workflows/copilot-setup-steps.yml |
Stops installing the pre-commit hook. |
.github/copilot-instructions.md |
Updates Java development guidance. |
.githooks/pre-commit |
Removes the Java formatting hook. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
62748a4 to
22263f7
Compare
edburns
left a comment
There was a problem hiding this comment.
I approve this and will also state so in the PR.
Replace the Java-only pre-commit hook with explicit format-java and lint-java recipes, include them in the aggregate commands, and retain existing CI enforcement. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
22263f7 to
26d19c8
Compare
Java is the only SDK with a repository-managed pre-commit formatting hook; the other SDKs use explicit local commands backed by CI. The hook also checks working-tree contents rather than the staged snapshot, so it is not reliable enforcement of what gets committed.
Replace the hook and its automatic installation with
just format-java(Spotless) andjust lint-java(Spotless and Checkstyle), and include Java in the aggregatejust formatandjust lintrecipes. Update the development documentation with these commands and their Maven equivalents.Existing Spotless and Checkstyle CI enforcement remains unchanged. Spotless continues to run explicitly in CI because
mvn verifyalone does not check formatting.