Skip to content

Unclear errors when running semantic rules with a minimal set of scalafix-cli flags #1957

Open
@BjarkeTornager

Description

@BjarkeTornager

When using scala-cli, from the root of my sbt project, as mentioned in the documentation:

 cs launch ch.epfl.scala:scalafix-cli_2.12.19:0.12.0+5-49b95fc4-SNAPSHOT -r sonatype:snapshots --main scalafix.cli.Cli -- --check

I get the following error:

error: 2 errors
[E0] A Scala compiler option is required to use RemoveUnused. To fix this problem,
update your build to add -Ywarn-unused (with 2.12), -Wunused (with 2.13), or
-Wunused:all (with 3.4+)
[E1] A Scala compiler option is required to use OrganizeImports with "OrganizeImports.removeUnused" set to true. To fix this problem, update your build to add `-Ywarn-unused` (2.12), `-Wunused:imports` (2.13), or `-Wunused:import` (3.4+).

I am using Scala 3.4.0. But adding the mentioned Scala compiler options does not seem to do the trick either. However, when using the sbt plugin for scalafix, sbt "scalafix --check" (0.12.0), I have no issues at all.

I also tried to use the scalafix-cli retrieved with cs install scalafix but I get the exact same error as above.

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