Skip to content

Deadcode breaks multiline assignments #26

Description

@Freyb

When deadcode detects an unused variable, it only attempts to remove the line of assignment, ignoring any further lines that are connected to the assignment.

Here, I have an assignment that takes the output of a function call that was broken into multiple lines. Deadcode only tries to remove the first line, leaving the second and the third line in place, resulting in a syntactically incorrect file.

-unused_variable = function_call(
     param1, param2, param3
 )

deadcode version: 2.4.1

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

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions