Skip to content
SPECIFICTION
Get listed

OpenRewrite vs Scalafix

OpenRewrite

openrewrite.org

Scalafix

scalacenter.github.io

Side by side

FigureOpenRewriteScalafix
Price fromFree—
Free planYes—
Free trial——
Open source——
Windows—Yes
macOS—Yes
LinuxYesYes
Self-hostedYes—
Plans published10
Spec score · Code Refactoring Tools8.2 (#6)7.0 (#20)
Build toolsOpenRewrite provides Maven and Gradle plugins for running recipes as part of a build.The documentation describes sbt support and lists externally maintained integrations for scala-cli, Mill, Gradle, Maven, and Mega-Linter.
PurposeOpenRewrite is an open-source automated refactoring ecosystem for eliminating technical debt in code repositories.Scalafix is a refactoring and linting tool for Scala.

Plans

OpenRewrite

  • OpenRewrite coreFree

OpenRewrite pricing →

Scalafix

No plans published.

Scalafix pricing →

In their own words

OpenRewrite

OpenRewrite is an open-source ecosystem for automated code refactoring, aimed at updating code and reducing technical debt. It represents code as Lossless Semantic Trees, applies transformations, and prints the result back into source code for review. Its recipes cover framework migrations, security fixes, and style consistency, and can be written in YAML, Refaster templates, or Java. Maven and Gradle plugins run recipes locally as part of builds, one repository at a time. The Maven plugin offers a dry run that reports potential changes and writes diff files; recipes run only when explicitly activated by name. Documented support includes Java, Kotlin, and Groovy, plus formats such as HCL, JSON, Properties, Protobuf, TOML, XML, and YAML. Framework coverage includes Spring, Quarkus, and Micronaut. The recipe index lists 4,183 recipes across modules. Core and language libraries use Apache License 2.0, but some recipes have other licensing terms. Core is free; some artifacts require authenticated repository access, and some recipes require a Moderne subscription.

Visit openrewrite.org

Scalafix

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.

Visit scalacenter.github.io