Scalafix

Scalafix

  • User guide
  • Developer guide
  • Browse sources
  • GitHub

›Rules

Usage

  • Installation
  • Configuration
  • Suppressing rules

Rules

  • Built-in rules
  • DisableSyntax
  • ExplicitResultTypes
  • LeakingImplicitClassVal
  • NoAutoTupling
  • NoValInForComprehension
  • OrganizeImports
  • ProcedureSyntax
  • RedundantSyntax
  • RemoveUnused
  • Using external rules
  • Community rules

Misc

  • Related projects
Edit

Community rules

Many rules have been developed and published by the community. Follow this documentation to use them in your project.

Help us increase visibility & foster collaboration by submitting your favorite rule(s) via pull requests!

Hygiene rules

Hygiene rules enforce conventions, failing the build on violation or rewriting the code when possible.

RepositoryArtifactDescription
xuwei-k/scalafix-rulescom.github.xuwei-k::scalafix-rulesAvoid ambiguous or redundant Scala syntax & features
vovapolu/scaluzzicom.github.vovapolu::scaluzziEnsure a subset of scalazzi
typelevel/typelevel-scalafixorg.typelevel::typelevel-scalafixSet of rules to provide automated rewrites and linting for code which makes use of Typelevel libraries
jatcwang/scalafix-named-paramscom.github.jatcwang::scalafix-named-paramsAdd named parameters for your constructor and method calls
pixiv/scalafix-pixiv-rulenet.pixiv::scalafix-pixiv-ruleRedundant Scala code rewriting and anti-pattern warnings
dedis/scapegoat-scalafixio.github.dedis::scapegoat-scalafixScalafix implementation of Scapegoat linter for Scala 3
ghostbuster91/scalafix-unifiedio.github.ghostbuster91.scalafix-unified::unifiedSet of opinionated rules to unify your codebase

Migration rules

Migration rules make it easier for library users to cope with deprecations and breaking changes.

Official migrations provided by library authors are not advertized here as they are usually well documented in the project itself. Note that Scala Steward keeps track of many of them, to provide a seamless experience to library users opting-in for the service.

RepositoryArtifactDescription
scala/scala-collection-compatorg.scala-lang.modules::scala-collection-migrationsRewrite upgrades to the 2.13 collections
lightbend-labs/scala-rewritesorg.scala-lang::scala-rewritesRewrites for Scala
ohze/scala-rewritescom.sandinh::scala-rewritesRewrites for Scala
xuwei-k/play-ws-scalafixcom.github.xuwei-k::play-ws-scalafixMigrate to play-ws-standalone
tersesystems/echopraxia-scalafixcom.tersesystems.echopraxia::scalafixRewrite Echopraxia logging statements
OlegYch/enumeratum-scalafixio.github.olegych::enumeratum-scalafixReplace scala.Enumeration with enumeratum

Code generation rules

Code generation rules extend the possibilities of the Scala language by taking a route similar, yet parallel to macros.

RepositoryArtifactDescription
earldouglas/linear-scalacom.earldouglas::linear-scala-scalafixAdd support for linear types in Scala
typelevel/simulacrum-scalafixorg.typelevel::simulacrum-scalafix-annotationsSimulacrum as Scalafix rules
rtimush/zio-magic-commentscom.timushev::zio-magic-commentsAdd explanatory graphs as comments to zio-magic methods
hamnis/dataclass-scalafixnet.hamnaberg::dataclass-scalafixalexarchambault/data-class as a Scalafix rule
sake92/kalemba.sake::kalem-rulesGenerate with* methods for classes
← Using external rulesRelated projects →
  • Hygiene rules
  • Migration rules
  • Code generation rules
Scalafix
Docs
Get startedRulesExtend Scalafix
Community
Chat on DiscordDiscuss on Scala Users
More
GitHub
Copyright © 2025 Scala Center