Skip to content

Introduce scalafmt#146

Open
ddworak wants to merge 3 commits into
masterfrom
introduce-scalafmt
Open

Introduce scalafmt#146
ddworak wants to merge 3 commits into
masterfrom
introduce-scalafmt

Conversation

@ddworak
Copy link
Copy Markdown
Member

@ddworak ddworak commented May 27, 2026

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 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.
  • 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.

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
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