Skip to content

Introduce scalafmt - #146

Merged
sebaciv merged 5 commits into
masterfrom
introduce-scalafmt
Oct 28, 2026
Merged

sebaciv merged 5 commits into
masterfrom
introduce-scalafmt

Conversation

@ddworak

@ddworak ddworak commented May 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Introduces scalafmt to scex (config + plugin + one-shot reformat). No CI enforcement gate yet — that's a deliberate follow-up so this large mechanical diff can be reviewed on its own.

  • Adds .scalafmt.conf (scalafmt 3.11.5) based on the shared AVSystem config (as used in scala-commons), with two deliberate differences:
    • runner.dialect = scala213 (not Scala213Source3) — scex does not compile with -Xsource:3.
    • RedundantParens is omitted from the rewrite rules. scex is existential-type-heavy, and that rule strips parens that are syntactically required around T forSome { ... } types in lambda-parameter ascriptions, producing code that no longer parses (hit in ValidationTest.scala and ScexCompilerTest.scala). Documented inline in the config.
  • Adds sbt-scalafmt 2.6.1 to project/plugins.sbt.
  • Reformats the whole codebase (scalafmtAll + scalafmtSbt): 123 files. The reformat was done with 3.11.1; bumping to 3.11.5 produced no formatting changes.
  • Adds .git-blame-ignore-revs pointing at the reformat commit so git blame skips it.

Commits

Kept separate for review: setup (config + plugin) → pure reformat → blame-ignore → scalafmt 3.11.5 bump (config only).

Test plan

  • sbt scalafmtCheckAll scalafmtSbtCheck passes after reformat
  • sbt compile Test/compile passes (verifies the rewrite rules didn't break anything)
  • CI green (no formatting gate added in this PR; build/test unaffected)

Follow-up

A separate PR will add the CI enforcement step (mirroring scala-commons / intellij-hocon).

@ddworak
ddworak requested a review from sebaciv May 29, 2026 13:41
@sebaciv
sebaciv force-pushed the introduce-scalafmt branch from 3228a45 to 6f2e8f7 Compare October 28, 2026 10:24
@sebaciv
sebaciv merged commit 4694cef into master Oct 28, 2026
9 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