Skip to content

Align Java formatting with shared just recipes - #2586

Merged
roji merged 1 commit into
mainfrom
roji-code-style-standardization
Sep 10, 2026
Merged

Align Java formatting with shared just recipes#2586
roji merged 1 commit into
mainfrom
roji-code-style-standardization

Conversation

@roji

@roji roji commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

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) and just lint-java (Spotless and Checkstyle), and include Java in the aggregate just format and just lint recipes. 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 verify alone does not check formatting.

Copilot AI balanced review requested due to automatic review settings September 9, 2026 13:09
@roji
roji requested a review from a team as a code owner September 9, 2026 13:09
@roji
roji requested a review from edburns September 9, 2026 13:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 just and 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.

Copilot AI commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Restore .NET dependencies

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 copilot-code-review.yml file. Read the docs for details.

@roji
roji force-pushed the roji-code-style-standardization branch from 62748a4 to 22263f7 Compare September 9, 2026 15:02
@roji
roji enabled auto-merge September 9, 2026 16:19

@edburns edburns left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve this and will also state so in the PR.

@roji
roji added this pull request to the merge queue Sep 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 9, 2026
@roji
roji added this pull request to the merge queue Sep 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 9, 2026
@roji
roji added this pull request to the merge queue Sep 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 9, 2026
@roji
roji added this pull request to the merge queue Sep 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 9, 2026
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>
@roji
roji force-pushed the roji-code-style-standardization branch from 22263f7 to 26d19c8 Compare September 9, 2026 21:03
@roji
roji added this pull request to the merge queue Sep 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 9, 2026
@roji
roji added this pull request to the merge queue Sep 9, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 9, 2026
@roji
roji added this pull request to the merge queue Sep 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 10, 2026
@roji
roji added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit a6df074 Sep 10, 2026
26 checks passed
@roji
roji deleted the roji-code-style-standardization branch September 10, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants