In order to test out the ExplicitResultTypes semantic rule with scalafix CLI like the example in the docs, one currently has to include scala-library in the --classpath argument.
$ scalafix --scala-version 2.13.10 --verbose --rules ExplicitResultTypes --classpath=/tmp/scala-library-2.13.10.jar --semanticdb-targetroots . --stdout
info: Processing (0/1) /tmp/scalafix-sandbox/Main.scala
package com.example
object Main {
def myComplexMethod: Map[Int,String] = 1.to(10).map(i => i -> i.toString).toMap
}
I think it'd be a smoother developer experience to include scala-library (and possibly other org.scala-lang.* libraries) on the classpath by default so that small examples with semantic rules work when people are using scalafix CLI as a means to try out the tooling for the first time.
originally surfaced in scalameta/scalameta#2979
In order to test out the
ExplicitResultTypessemantic rule with scalafix CLI like the example in the docs, one currently has to includescala-libraryin the--classpathargument.I think it'd be a smoother developer experience to include
scala-library(and possibly otherorg.scala-lang.*libraries) on the classpath by default so that small examples with semantic rules work when people are using scalafix CLI as a means to try out the tooling for the first time.originally surfaced in scalameta/scalameta#2979