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)
Problem
Nixd can already successfully detect and warn about unused attributes inside lambda patterns (eg.
yis 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 + 1returns an empty diagnostics array[]instead of warning it for the unusedySolution
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)