Skip to content

style: enforce Spotless formatting in CI - #1272

Open
kabir wants to merge 3 commits into
a2aproject:mainfrom
kabir:issue-139-spotless
Open

kabir wants to merge 3 commits into
a2aproject:mainfrom
kabir:issue-139-spotless

Conversation

@kabir

@kabir kabir commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Spotless was configured but skipped by default, so CI did not report formatting violations. Add a dedicated JDK 25 formatting workflow that explicitly enables spotless:check on pushes and pull requests, including documentation-only changes.

The infrastructure commit documents the formatter commands and excludes generated gRPC sources, build outputs, and frozen documentation snapshots. It also removes two unsafe transformations discovered during validation: fully qualified type shortening dropped @Nullable annotations, and Flexmark reflow collapsed Markdown lists into paragraphs. Markdown retains newline checks.

The second commit applies the configured Java and POM formatting. Generated sources and released documentation are unchanged. Ordinary builds retain their default skip setting so Java 17 builds do not invoke the newer formatter.

Validation on JDK 25:

  • mvn -B -N -Dskip.spotless=false spotless:check passed.
  • mvn -B package -DskipDockerTests=true -fae passed across all 83 modules; 3,712 tests reported, zero failures/errors, 137 skipped.
  • git diff --check passed.

This fixes #139

kabir added 3 commits November 2, 2026 21:44
Add a dedicated JDK 25 workflow and contributor commands. Exclude build
outputs, generated gRPC sources, and released documentation snapshots.
Disable type shortening that drops nullability annotations and Markdown
reflow that corrupts lists.

This fixes a2aproject#139
Apply the configured Java and POM formatting throughout the repository.

This fixes a2aproject#139

This branch has not been deployed

No deployments
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.

Code formatter/reporter

1 participant