
Scalafix
Summary
Scalafix is a free refactoring and linting tool for Scala projects. It can identify code patterns linked to production bugs or style violations, automate routine code-health work and run one-time migration scripts. Teams can apply linting and refactoring rules during code review; its check option fails when fixes or linting are needed. Syntactic rules work directly on source code, while semantic rules need compiled sources with the SemanticDB compiler plugin enabled. Built-in rules include OrganizeImports, RemoveUnused, DisableSyntax, ProcedureSyntax and RedundantSyntax. Developers can also write their own lint and rewrite rules using its public API. The official build integration is for sbt; documentation also lists externally maintained integrations for scala-cli, Mill, Gradle, Maven and Mega-Linter. The latter supports only built-in syntactic rules. Scalafix is tested on macOS, Linux and Windows, and documented tested Scala versions include 2.12.21, 2.13.18 and 3.9.0 LTS. It is no longer published for Scala 2.11 or sbt 0.13.x.
Who it is for
Scalafix suits Scala developers and teams that want repeatable linting, automated refactoring or migration scripts. Semantic-rule users need compiled sources with SemanticDB enabled.
What is good
- Free to use.
- Supports custom lint and rewrite rules.
- Rules can run during code review.
- Tested on macOS, Linux and Windows.
- Built-in rules cover imports and unused code.
What to know first
- No longer published for Scala 2.11.
- Semantic rules require SemanticDB-compiled sources.
- Mega-Linter supports only built-in syntactic rules.
- sbt-scalafix is no longer published for sbt 0.13.x.
Verdict
Scalafix offers Scala-focused linting and refactoring, including custom rules and CI checks. Check its Scala version and build-tool requirements, especially if you need semantic rules or Mega-Linter.
Compared on code refactoring tools
- Free plan
- Yesscalacenter.github.io
- Supported languages
- Scala 2.12, Scala 2.13, Scala 3scalacenter.github.io
- Refactoring scope
- projectscalacenter.github.io
- Batch refactoring
- Yesscalacenter.github.io
- AST-based analysis
- Yesscalacenter.github.io
- Deployment
- desktopscalacenter.github.io
Facts
- Purpose
- Scalafix is a refactoring and linting tool for Scala that automates code health tasks and one-time migrations.scalacenter.github.io · 2 Oct 2026
- Linting
- It reports code patterns that can cause production bugs or violate coding style.scalacenter.github.io · 2 Oct 2026
- CI
- Scalafix can enforce refactoring and linting rules during code review.scalacenter.github.io · 2 Oct 2026
- Rule types
- Syntactic rules run on source code without compilation, while semantic rules require compiled sources with the SemanticDB compiler plugin enabled.scalacenter.github.io · 2 Oct 2026
- Built-in rules
- Built-in rules include OrganizeImports, RemoveUnused, DisableSyntax, ProcedureSyntax, and RedundantSyntax.scalacenter.github.io · 2 Oct 2026
- Custom rules
- Developers can write custom linter and rewrite rules using Scalafix’s public API.scalacenter.github.io · 2 Oct 2026
- Build tools
- The documentation describes sbt support and lists externally maintained integrations for scala-cli, Mill, Gradle, Maven, and Mega-Linter.scalacenter.github.io · 2 Oct 2026
- Mega-Linter limit
- The Mega-Linter integration supports only built-in syntactic rules.scalacenter.github.io · 2 Oct 2026
- Supported operating systems
- Scalafix is tested to work on macOS, Linux, and Windows; other setups may work but could behave unexpectedly.scalacenter.github.io · 2 Oct 2026
- Scala support
- The installation guide lists Scala 2.12.21, 2.13.18, and 3.9.0 LTS as tested versions and says Scalafix is no longer published for Scala 2.11.scalacenter.github.io · 2 Oct 2026
- Semantic rule requirement
- Semantic rules require source files compiled with SemanticDB, and some rules also require compiler options such as unused-import warnings.scalacenter.github.io · 2 Oct 2026
- Support and community
- The Scalafix site links to community help on Discord and Scala Users.scalacenter.github.io · 2 Oct 2026
- Maker
- The Scala Center describes itself as an independent not-for-profit center established at EPFL and focused on open source and education.scala.epfl.ch · 2 Oct 2026
- Refactoring
- It can automate day-to-day code health tasks and one-time migration scripts.scalacenter.github.io · 3 Oct 2026
- CI enforcement
- Scalafix can enforce refactoring and linting rules on code reviews, and its --check option fails when fixes or linting are needed.scalacenter.github.io · 3 Oct 2026
- Build integration
- The official sbt plugin supports running rules across project configurations and main and test sources.scalacenter.github.io · 3 Oct 2026
- Other build tools
- The documentation lists externally maintained support for scala-cli, Mill, Gradle, Maven, and Mega-Linter; Mega-Linter supports only built-in syntactic rules.scalacenter.github.io · 3 Oct 2026
- Supported systems
- Scalafix is tested on macOS, Linux, and Windows.scalacenter.github.io · 3 Oct 2026
- Version limits
- The documentation says Scalafix is no longer published for Scala 2.11 and sbt-scalafix is no longer published for sbt 0.13.x.scalacenter.github.io · 3 Oct 2026
- Community support
- The project links to community discussion on Discord and Scala Users.scalacenter.github.io · 3 Oct 2026
Company
- Founded
- 2016scalacenter.github.io · 28 Sept 2026
- Headquarters
- Lausanne, Switzerlandscalacenter.github.io · 28 Sept 2026
Best Scalafix alternatives
See all 12Where it ranks on Everything Xiaomi
Is Scalafix yours?
Claim it for free: prove the domain, then correct facts, plans and screenshots. An editor reviews every change.
Sources
- scalacenter.github.io/scalafix/· checked 2 Oct 2026
- scalacenter.github.io/scalafix/docs/rules/overview.html· checked 2 Oct 2026
- scalacenter.github.io/scalafix/docs/developers/setup.html· checked 2 Oct 2026
- scalacenter.github.io/scalafix/docs/users/installation.html· checked 2 Oct 2026
- scala.epfl.ch· checked 2 Oct 2026




