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.
Fail
Value something is not used:
case maybe of
Just something ->
True
Nothing ->
False
Success
case maybe of
Just _ ->
True
Nothing ->
False
Try it out
You can try this rule out by running the following command:
Report useless patterns and pattern values that are not used.
🔧 Running with
--fixwill automatically remove all the reported errors.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.
Fail
Value
somethingis not used:Success
Try it out
You can try this rule out by running the following command: