Skip to content

Align generated project formatting with Pekko core - #84

Merged
pjfanning merged 1 commit into
apache:mainfrom
He-Pin:align-core-formatters
Nov 13, 2026
Merged

pjfanning merged 1 commit into
apache:mainfrom
He-Pin:align-core-formatters

Conversation

@He-Pin

@He-Pin He-Pin commented Nov 12, 2026

Copy link
Copy Markdown
Member

Motivation

Make generated sbt projects use the formatter plugins and style from Apache Pekko main (6049edf9), separately from the Scalafix OrganizeImports work.

Modification

  • Add sbt-scalafmt 2.6.2 and the core Scalafmt 3.11.5 configuration, with project.git = false so newly generated projects work before Git initialization.
  • Add applyCodeStyle and checkCodeStyle aliases for source and sbt build files.
  • Add sbt-java-formatter 0.14.0, select the JDK 17 formatter, and preserve Java import order.
  • Format the template sources to provide a clean default-generated baseline, preserving snippet markers and placeholders. Maven/Gradle build configurations are unchanged.

Tests

  • Generated the project with the default sbt g8 settings (generated sbt 1.13.1, JDK 17).
  • Ran checkCodeStyle; applyCodeStyle; checkCodeStyle on a fresh generated project.
  • Final generated sources passed formatting checks before any rewrite; repeated formatting and checks also passed.
  • Verified documentation snippet marker sequences are unchanged and ran git diff --check.
  • Test / compile passed for the generated application and tests. Template-rendering logs contained no fallback or rendering failures, and generated sources contained no template placeholders.
  • Runtime application tests were not executed; main and test compilation was verified.

@pjfanning pjfanning left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@pjfanning
pjfanning merged commit 143979b into apache:main Nov 13, 2026
2 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.

2 participants