Skip to content

RemoveUnused with -Ywarn-unused:<option> #1848

Closed
@bmarker

Description

@bmarker

RemoveUnused and the removeUnused option for OrganizedImports don't seem to recognize the -Ywarn-unused:imports and similar options.

I had these from tpolecat:

  "-Ywarn-unused:implicits",           // Warn if an implicit parameter is unused.
  "-Ywarn-unused:imports",             // Warn if an import selector is not referenced.
  "-Ywarn-unused:locals",              // Warn if a local definition is unused.
  "-Ywarn-unused:params",              // Warn if a value parameter is unused.
  "-Ywarn-unused:patvars",             // Warn if a variable bound in a pattern is unused.
  "-Ywarn-unused:privates",            // Warn if a private member is unused.

But I still had to add -Ywarn-unused to get removing unused imports working.

I don't know if there's a check for the scalacOptions that could be adjusted or if it's more about how the rules work.

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