hi, I'm having some trouble to use scalafix with p...
# general
b
hi, I'm having some trouble to use scalafix with pants. I run
./pants fmt.scalafix --semantic --rules=RemoveUnused libs/common/src/main/scala
and I got the following message :
Copy code
==== stderr ====

                     ==== stdout ====
                     error: The Scala compiler option "-Ywarn-unused" is required to use RemoveUnused.
                     To fix this problem, update your build to use at least one Scala compiler
                     option that starts with "-Ywarn-unused"
                     DEBUG] releasing lock: <pants.process.lock.OwnerPrintingInterProcessFileLock object at 0x7f65e8085410>                                                                                                                   

FAILURE: scalafix.cli.Cli ... failed to fix (4) targets.
yet I have these lines in my pants.ini
Copy code
[compile.zinc]
args: [
      # ...
      '-S-Ywarn-unused:implicits',
      '-S-Ywarn-unused:imports',
      '-S-Ywarn-unused:locals',
      '-S-Ywarn-unused:params',
      '-S-Ywarn-unused:patvars',
      '-S-Ywarn-unused:privates',
      '-S-Ywarn-value-discard',
      '-S-Yrangepos'
  ]
And the
ldebug
does show me these args
w
possibly scalac is expecting
-Ywarn-unused
as an option instead of the finer grained ones?
b
yet the message says
that starts with "-Ywarn-unused"
, but good point, I'll try it tomorrow, thx
w
b
sorry it does not help, and using the vanilla
-Ywarn-unused
does not do the trick either 😕