Report useless patterns and pattern values that are not used.
rule : Review.Rule.Rule
Report useless patterns and pattern values that are not used.
🔧 Running with --fix
will automatically remove all the reported errors.
config =
[ NoUnused.Patterns.rule
]
This rule looks within let..in blocks and case branches to find any patterns that are unused. It will report any useless patterns as well as any pattern values that are not used.
Value something
is not used:
case maybe of
Just something ->
True
Nothing ->
False
case maybe of
Just _ ->
True
Nothing ->
False
You can try this rule out by running the following command:
elm-review --template jfmengels/elm-review-unused/example --rules NoUnused.Patterns