Skip to content

scalafix CLI should include scala-library on the classpath by default #1712

Description

@mackenziestarr

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions