Skip to content
SPECIFICTION
Get listed

Scalafix

scalacenter.github.io

WindowsmacOSLinux

What it is

Scalafix is a refactoring and linting tool for Scala that automates routine code-health work and one-time migrations. It reports patterns that may lead to production bugs or conflict with coding style, and teams can run rules during code review. Its check option fails when linting or fixes are needed. Syntactic rules run directly on source code; semantic rules need compiled sources with the SemanticDB compiler plugin enabled. Built-in rules include OrganizeImports, RemoveUnused, DisableSyntax, ProcedureSyntax, and RedundantSyntax. Developers can also create custom lint and rewrite rules through 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, whose integration supports only built-in syntactic rules. Scalafix is tested on macOS, Linux, and Windows. Listed tested Scala versions are 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. Community help is available through Discord and Scala Users. The tool is free.

Spec sheet

Purpose
Scalafix is a refactoring and linting tool for Scala.Read 3 Oct 2026 · scalacenter.github.io
Headquarters
Lausanne, SwitzerlandRead 28 Sep 2026 · scalacenter.github.io
Founded
2016Read 28 Sep 2026 · scalacenter.github.io
Maker
The project site identifies Scala Center in its copyright notice.Read 3 Oct 2026 · scalacenter.github.io
Build integration
The official sbt plugin supports running rules across project configurations and main and test sources.Read 3 Oct 2026 · scalacenter.github.io
Build tools
The documentation describes sbt support and lists externally maintained integrations for scala-cli, Mill, Gradle, Maven, and Mega-Linter.Read 2 Oct 2026 · scalacenter.github.io
Built-in rules
The built-in rule list includes RemoveUnused, OrganizeImports, ExplicitResultTypes, and DisableSyntax.Read 3 Oct 2026 · scalacenter.github.io
CI
Scalafix can enforce refactoring and linting rules during code review.Read 2 Oct 2026 · scalacenter.github.io
CI enforcement
Scalafix can enforce refactoring and linting rules on code reviews, and its --check option fails when fixes or linting are needed.Read 3 Oct 2026 · scalacenter.github.io
Community support
The project links to community discussion on Discord and Scala Users.Read 3 Oct 2026 · scalacenter.github.io
Custom rules
Users can create custom linter and rewrite rules using the Scalafix public API.Read 3 Oct 2026 · scalacenter.github.io
Linting
It reports errors for code patterns that can cause production bugs or violate coding style.Read 3 Oct 2026 · scalacenter.github.io
Mega-Linter limit
The Mega-Linter integration supports only built-in syntactic rules.Read 2 Oct 2026 · scalacenter.github.io
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.Read 3 Oct 2026 · scalacenter.github.io
Refactoring
It can automate day-to-day code health tasks and one-time migration scripts.Read 3 Oct 2026 · scalacenter.github.io
Rule types
It supports syntactic rules that can run without compilation and semantic rules that require SemanticDB compiler output.Read 3 Oct 2026 · scalacenter.github.io
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.Read 2 Oct 2026 · scalacenter.github.io
Semantic rule requirement
Semantic rules require source files compiled with SemanticDB, and some rules also require compiler options such as unused-import warnings.Read 2 Oct 2026 · scalacenter.github.io
Support and community
The Scalafix site links to community help on Discord and Scala Users.Read 2 Oct 2026 · scalacenter.github.io
Supported operating systems
Scalafix is tested to work on macOS, Linux, and Windows; other setups may work but could behave unexpectedly.Read 2 Oct 2026 · scalacenter.github.io
Supported systems
Scalafix is tested on macOS, Linux, and Windows.Read 3 Oct 2026 · scalacenter.github.io
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.Read 3 Oct 2026 · scalacenter.github.io

Strong points and limits

Strong points

  • Rules can run during code review.
  • Custom lint and rewrite rules use a public API.
  • Built-in rules cover imports, syntax, and unused code.
  • Tested on macOS, Linux, and Windows.
  • Free plan.

Limits

  • Semantic rules require compiled sources and SemanticDB.
  • No longer published for Scala 2.11.
  • Mega-Linter supports only built-in syntactic rules.
  • sbt-scalafix is no longer published for sbt 0.13.x.

Who it suits

Scalafix suits Scala developers and teams that want to automate refactoring, linting, or migrations. It is particularly relevant for projects using sbt or supported external integrations.

Verdict

Scalafix offers built-in and custom rules for Scala linting and refactoring, with code-review enforcement and migration support. Check its Scala and sbt version limits, and note that semantic rules require SemanticDB-enabled compilation.

Where Specifiction places it

Alternatives to ScalafixAll alternatives →