Skip to content

RemoveUnused does not clean up nested unused references #1462

Open
@gatisnolv

Description

@gatisnolv

Consider this example:

class Example {
    private def a = 1
    private def b = a
    private def c = b
}

To clean it up from all the unused references requires 3 separate invocations of scalafix. I suppose that's because the compiler only reports one of them as unused per invocation. I think it would make sense that these would be picked up in a single scalafix invocation. I'm not sure what would be the best approach to address this as I'm new to scalafix and ran into this while cleaning up a project.

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