Work is in progress on both Scala 2 and 3 for the compilers to provide “quick fixes” with warnings and errors (Roadmap for actionable diagnostics).
While mainly intended for IDEs, it can also be practical to make the compiler directly apply quick fixes to source files. For example, when enabling
-Xsource:3 in Scala 2 for migrating a codebase, the compiler can perform some rewrites automatically.
I implemented a corresponding
-quickfix compiler option for Scala 2, please provide feedback on the PR: scala/scala#10482.