Scalafix v0.9.1
We are happy to announce the release of Scalafix v0.9.1. Scalafix is a refactoring and linting tool for Scala.
Better performance
Running Scalafix on large codebases can be up to 2x faster now. A benchmark running Scalafix on the Spark codebase (3.201 files; 103.181 lines) previously took ~50 seconds now takes ~25 seconds. For more details see #898. Big thanks to @marcelocenerine for this contribution!
Advanced regex disable
From #907
- Now error messages will underline the whole area of matched regex
- The relevant capture group can be specified, in case you have complicated regex's which may match on parts which aren't helpful in the error message
- scalafix errors which came from a regex match have access to the capture groups for substitution in the error messages.
Big thanks to @Jacoby6000 for this contribution!
Java 11
Scalafix now runs on Java 11. Our CI additionally runs the full build on Java 11 for every PR to prevent regressions.
Run published rules directly from the shell
Previously, you needed to declare scalafixDependencies
in build.sbt to run published rules.
// before: build.sbt
scalafixDependencies in ThisBuild += "org.http4s" %% "http4s-scalafix" % "0.20.0-M3"
Now it's possible to run published rules directly from the sbt shell without updating build.sbt
> scalafix dependency:Http4s018To029@org.http4s:http4s-scalafix:0.20.0-M3
Custom resolvers for published rules
Previously, sbt-scalafix required published custom rules to be available on Maven Central. Now it's possible to publish custom rules anywhere (for example Bintray) and resolve them by updating scalafixResolvers
in build.sbt. Big thanks to @kamilkloch for implementing this feature
Disable while loops
The new option DisableSyntax.noWhileLoops=true
will trigger Scalafix to error on the usage of while loops.
Improved error messages
PR #910 improved the reported messages for unexpected errors. Thanks to @raboof for reporting!
Contributors
$ git shortlog -sn --no-merges v0.9.0..v0.9.1
Jacob Barber
Ólafur Páll Geirsson
Kamil Kloch
Marcelo Cenerino