scalacenter/sbt-scalafix
60.1
Adequate · 20 September 2026
2k
lines of production code
Scala
primary language
1
measurement over time
What this system is
This system is the sbt-scalafix plugin, an integration layer that enables the Scalafix code refactoring tool within the sbt build system. It provides capabilities for executing linting and semantic refactoring rules across various Scala versions and sbt configurations, including support for Scala 3 and sbt 2.x. The plugin manages rule resolution, caching, and execution order, while offering features like automatic linting on compile, per-configuration rule sets, and comprehensive CLI options for targeted file processing.
How it got here
2018 — sbt 2.x compatibility and refactoring
18 changes.
The project underwent significant internal refactoring to support sbt 2.x, including dropping older Scala and sbt versions and rewriting the execution engine for better compatibility. This period also involved upgrading the build infrastructure, migrating test suites to MUnit, and expanding integration tests to cover new features and configuration scenarios.
2020–2026 — comprehensive sbt-scalafix test coverage
13 changes.
This period focused on expanding the sbt-scalafix plugin's test suite to cover a wide range of features and edge cases. The work included validating CLI options, configuration scoping, compilation integration, concurrency safety, and semanticdb support across multiple Scala versions. It also added tests for resolver handling, caching mechanisms, and build linting to ensure robust plugin behavior.
Features
Added test-release.sh script for validating sbt plugin releases
A new shell script, bin/test-release.sh, has been added to the project. This script allows users to verify the resolution of sbt plugin artifacts for specific versions by using Coursier to resolve both the standard sbt 1.0 plugin and the cross-built sbt 2.0 plugin artifacts.
bin · high confidence
Initial project setup and configuration
The repository has been initialized with essential configuration files, including a BSD 3-Clause license, a README with installation and nightly usage instructions, and a CONTRIBUTING guide. Development tooling is configured via .scalafmt.conf (updated to version 3.11.5 with Scala 3 dialect), .scalafix.conf (defining ExplicitResultTypes, OrganizeImports, and RemoveUnused rules), and .scala-steward.conf (for automated dependency updates). Additional files like .gitattributes, .jvmopts, and .gitignore establish standard project conventions.
(repo-wide) · high confidence
Behavioural changes
Major internal refactoring and sbt 2.x compatibility for Scalafix
The sbt-scalafix plugin has been significantly refactored to support sbt 2.x and modernize its internals. This includes dropping support for sbt 0.13 and Scala 2.11, introducing a new thread-safe \BlockingCache\ for incremental runs, and adding a \CoursierRepoResolvers\ module to handle repository resolution. New compatibility layers (\Compat.scala\) and a \JLineAccess\ helper ensure correct behavior across different sbt versions, while \ScalafixCompletions\ now provides richer tab-completion for rules and Git branches. The plugin also introduces \scalafixJGitCompletion\ to reduce memory usage and adds a \SemanticRuleValidator\ to provide clearer error messages when semanticdb is missing.
src/main · high confidence
Refactored Scalafix execution engine and relaxed compiler options for smoother upgrades
The internal execution engine for Scalafix has been rewritten to delegate rule fetching and classloading to the \scalafix-interfaces\ library, introducing a new \ScalafixInterface\ that manages argument building and caching. This change is accompanied by a significant relaxation of \scalacOptions\ (including \-Xfatal-warnings\) during Scalafix invocations via \ScalafixEnable\, reducing friction for users with strict compiler settings. Additionally, support for Scala 2.11 has been dropped, and the \scalafixEnable\ command now automatically configures the SemanticDB plugin with compatible versions, forcing the Scala version if necessary to ensure rule compatibility.
repository · high confidence
Update test utility to use Sonatype Central Snapshots and add diff-utils dependency
The sbt test project for scalafix suppression now resolves plugins from Sonatype Central Snapshots instead of the previous OSSRH public/snapshots repository. Additionally, the test utility code has been updated to include the diffutils library (version 1.3.0) as a dependency, enabling the new ScalafixTestUtility to generate unified diffs for comparing expected and obtained file contents during tests.
src/sbt-test/sbt-scalafix/suppress/project · high confidence
Test coverage
Add basic sbt-scalafix integration test; Add sbt-scalafix dependency test for one-line rule syntax; Add scripted test for sbt resolver integration with custom rules; Add test case for custom configuration and scalafixAll task; Add test for scalafix on projects with root sources; Add test for scalafix suppression of null keyword; Added concurrency stress-test for Scalafix rules; Added integration test for scalafixOnCompile feature; Added sbt-scalafix wrapper test suite; Added sbt-test for scalafix with semanticdb support; Added scripted test for build linting; Added scripted test for copyResources ordering; Added scripted test for scalafixResolvers with custom resolver configuration; Added test case for root-level Scalafix validation; Added test demonstrating per-configuration Scalafix rule sets; Added test for scalafix skip configuration; Added test infrastructure and suites for SBT plugin internals; Added test suite for inconfig settings validation; Added test suite for scalafix basic functionality; Added tests for scalafixEnable behavior; Added tests for unavailable semanticdb-scalac scenarios; Expanded sbt-scalafix test coverage for Scala 3, caching, and local rules; Refactor scalafixEnable scripted test to support plugin-set scalacOptions; Test suite for explicit file targeting via --files CLI option.
Dependencies
Build infrastructure upgraded to sbt 1.12 and updated core dependencies
The build system has been upgraded from sbt 1.1.6 to 1.12.15, and the sbt-ci-release plugin has been updated to version 1.12.0. Core library dependencies have been refreshed, including org.eclipse.jgit to 5.13.5, scalafix-interfaces to 0.14.9, the coursier interface to 1.0.28, and scala-collection-compat to 2.14.0. Additionally, the build configuration now resolves artifacts from Sonatype Central Snapshots and includes source directories for dogfooding the project's own libraries.
project · high confidence
Migrate scripted tests to MUnit and update test dependencies
The sbt-scalafix scripted test suite has been refactored to use MUnit (version 0.7.9) as the primary assertion framework, replacing the previous reliance on ScalaTest (version 3.2.20) and ScalaCheck (version 1.13.5) for test assertions. This change updates the \libraryDependencies\ in the test \build.sbt\ files to include \munit\ and removes the corresponding ScalaTest and ScalaCheck dependencies, streamlining the test infrastructure for the plugin's integration tests.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 60.
Lenses
- Code Health 95
- Architecture 100
- Maturity 44
- Readiness 73
- Security 65
Changes since last survey
- 300 commits — 283 feature/other, 17 fixes
By area
- (repo) — 131 commits
- src/sbt-test — 34 commits
- (root) — 33 commits
- src/main — 27 commits
- project/Dependencies.scala — 22 commits
- project/build.properties — 21 commits
- .github/workflows — 15 commits
- project/plugins.sbt — 11 commits
- src/test — 4 commits
- bin/scalafmt — 1 commit
- bin/test-release.sh — 1 commit
Notable commits
- fix: Depend on copyResources to fix a race condition (#568)
- fix: Merge pull request #478 from bjaglin/fix-sbt2-milestone-resolving
- fix: Merge pull request #491 from scalacenter/revert-489-update/sbt-ci-release-1.11.0
- fix: Merge pull request #501 from scalacenter/copilot/fix-072a2c3c-d025-4b27-ab3b-0b843abf9041
- fix: Merge pull request #506 from scalacenter/copilot/fix-78e565c2-1275-40ae-9e08-690c6b0a46df
- fix: Merge pull request #508 from scalacenter/fix-oss-snapshots-connect-error-windows-scripted
- fix: Merge pull request #533 from bjaglin/fix-resolvers-sonatype-retention
- fix: Revert "Update sbt-ci-release to 1.11.0"
- fix: bump jgit to fix [CVE redacted]
- fix: bump sbt-ci-release to fix JDK8 support
- fix: fix JGitCompletions memory leak
- fix: fix Scala 2.11 detection & use same instance across patch releases
- fix: fix resolvers scripted in windows CI
- fix: fix scripted impacted by OSSRH shutdown
- fix: fix testing of scalafixDependencies alongside local rules
- fix: remove workaround for bug fixed upstream
- fix: workaround bug on builds handled by sbt 2.0.0-M4
- change: / is supported as a separator on windows
- change: Add 'Reformat with scalafmt 3.10.6' to .git-blame-ignore-revs
- change: Add 'Reformat with scalafmt 3.8.4' to .git-blame-ignore-revs
- …and 280 more
Architecture
- 0 containers · 1 bounded contexts · 0 dependency edges (baseline)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
scalacenter/sbt-scalafix was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 761b971f958028b46e09c81e35ef9876414f1e61 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.