Our team relied almost solely on fatal warnings coming directly from the Scala 2 compiler. Moving to Scala 3, we feel like flying without a parachute. There’s nothing in the Scala 2 warnings we couldn’t manually detect with enough time, but in reality lots of thing creep all the way from merge request through review and into the main branch. Often it’s not bugs directly, but slowly and surely, the code health seems to deteriorate.
A few very warnings which could go a long way:
- Unused imports
- Unused local value/parameters
- Pure expression in statement position (not sure if this one was ever from the compiler or IntelliJ, feels like I haven’t seen it in a while)
For the first one above, I would settle for a working “optimize imports” functionality, but that also seems out of reach with both Metals and IntelliJ at the moment.
I fear the usage of this approach might be underestimated? You would previously get so much mileage out of just adding e.g. GitHub - typelevel/sbt-tpolecat: scalac options for the enlightened which just enables more or less everything.
I’m hopeful this could get prioritized more in the near future