Skip to content

build: enforce google-java-format with a spotless check gate - #73

Merged
Zhoujie628 merged 2 commits into
project-openan:mainfrom
Zhoujie628:main
Sep 14, 2026
Merged

Zhoujie628 merged 2 commits into
project-openan:mainfrom
Zhoujie628:main

Conversation

@Zhoujie628

Copy link
Copy Markdown
Contributor

Formatting was previously maintained by hand and drifted between main and dev (see #71's convergence commit). This adds a tool-enforced gate so that class of drift cannot reappear.

  • style: apply google-java-format — one-time normalization of the published modules (workflow-engine, spring-boot-starter) with google-java-format 1.22.0 (GOOGLE style) plus unused-import removal. Line wrapping, continuation indents, import ordering and javadoc reflow only; no logic changes.
  • build: add spotless google-java-format check gate — spotless-maven-plugin 2.46.1, spotless:check bound to validate in every module, so mvn verify and the release pipeline fail on non-canonical formatting. The samples demo module opts out via spotless.skip (vendor adapter code stays outside the gate). Local one-touch formatting: mvn spotless:apply.

Verified with the full mvn -B clean verify gate (including the new check) locally.

One-time normalization with google-java-format 1.22.0 (GOOGLE style) plus
unused-import removal across the published modules (workflow-engine,
spring-boot-starter). No logic changes: the diff is line wrapping,
continuation indents, import ordering and javadoc reflow. This is the
canonical state enforced by the spotless check gate added in the next
commit.

Signed-off-by: Zhoujie628 <zhoujie628@users.noreply.github.com>
spotless-maven-plugin 2.46.1 with google-java-format 1.22.0 (GOOGLE style)
and unused-import removal. spotless:check binds to validate in every module,
so mvn verify and the release pipeline fail on non-canonical formatting.
The samples demo module opts out via spotless.skip: the gate covers the
published modules (workflow-engine, spring-boot-starter); vendor adapter
code stays outside it. Run mvn spotless:apply for one-touch formatting.

Signed-off-by: Zhoujie628 <zhoujie628@users.noreply.github.com>
@Zhoujie628
Zhoujie628 requested a review from a team as a code owner September 14, 2026 16:05
@Zhoujie628
Zhoujie628 merged commit b2dc1a3 into project-openan:main Sep 14, 2026
3 checks passed
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.

1 participant