Scalafix is a rewrite and linting tool for Scala. Key features of Scalafix include:

  • Fidelity: Scalafix supports formatting-aware rewriting of Scala code. Every detail in the source file is represented with rich data structures and full position information, down to individual space characters.

  • Extensible: Implement your own custom Scalafix rules. Jumpstart with our scalacenter/scalafix.g8 template, which sets up a minimal sbt project with testing scaffolding.

  • Accessible: Scalafix enables novices to implement advanced rules without learning compiler internals.

  • Portable: Scalafix works with a wide range of Scala dialects (sbt, Scala 2.x, Dotty) and runs on JVM, Node.js and in the browser.

Scalafix is developed at the Scala Center with the goal to help automate migration between different Scala compiler and library versions. The project follows the Advisory Board proposal: Clarification of Scala to Dotty migration path