Skip to content

Detection of Unused Simple Lambda Arguments #796

@Malix-Labs

Description

@Malix-Labs

Problem

Nixd can already successfully detect and warn about unused attributes inside lambda patterns (eg. y is unused in {x, y}: x + 1), but it does not seem to warn about unused simple lambda arguments yet.
For example, evaluating the expression x: y: x + 1 returns an empty diagnostics array [] instead of warning it for the unused y

Solution

Featuring the detection of unused simple lambda arguments

Additional Context

#778 implements a code action that actually detects those occurrences and remove them, I am not sure if it also implement the warning

deadnix implements that feature (it's actually the only missing dead code detection feature nixd lacks over deadnix if I'm not mistaken)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions