Enforce scalafmt in CI#849
Merged
Merged
Conversation
Adds a dedicated GitHub Actions job that runs scalafmtCheckAll + scalafmtSbtCheck on every PR, modeled on the existing mima job. Without enforcement, formatter drift accumulates silently — increasingly relevant as AI-assisted edits land in the repo. Bundles supersedes of scala-steward PRs #845 (sbt-scalafmt 2.6.0 -> 2.6.1) and #846 (scalafmt-core 3.11.0 -> 3.11.1), since the new check would otherwise fail on master against the one file #846 reformats.
1cd1705 to
219228b
Compare
There was a problem hiding this comment.
Pull request overview
Adds scalafmt enforcement to CI by defining a dedicated sbt-github-actions job and committing the regenerated workflow.
Changes:
- Adds a
scalafmtworkflow job inproject/Commons.scala. - Regenerates
.github/workflows/ci.ymlwith a parallelScalafmt Checkjob runningscalafmtCheckAllandscalafmtSbtCheck.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
project/Commons.scala |
Adds the generated CI job definition for scalafmt checks. |
.github/workflows/ci.yml |
Regenerated workflow including the new scalafmt job. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
halotukozak
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scalafmtGitHub Actions job (parallel tobuildandmima) that runsscalafmtCheckAll+scalafmtSbtCheckon every PR. Modeled on the existingmimajob — single JDK (temurin@21), single Scala version.WorkflowJobinproject/Commons.scalaand the regenerated.github/workflows/ci.yml.Why now
Pattern check across our other repos: the DSLAM family (dhcp, dslam-ui, dslam-mc, yanush) all enforce scalafmt in CI; standalone Scala apps (ump, coiote-ae) carry
.scalafmt.confbut no enforcement. scala-commons was the odd one out — it tracked the sbt plugin via steward without actually invoking it. With AI-assisted edits becoming more common, automated format enforcement earns its keep.Test plan
sbt scalafmtCheckAll scalafmtSbtCheckpasses locally (post Update sbt-scalafmt to 2.6.1 #845 / Update scalafmt-core to 3.11.1 #846 merges, the codebase is already conformant)sbt githubWorkflowCheckpasses (generated workflow matches build config)