🔧 Running with --fix will automatically remove some of the reported errors.
config =
[ NoUnused.Parameters.rule
]
This rule looks within function arguments, let functions and lambdas to find any values that are unused. It will report any parameters that are not used.
Fixes for lambdas
We're only offering fixes for lambdas here because we believe unused parameters in functions are a code smell that should be refactored.
Fail
Value something is not used:
add1 number =
1
Success
add1 number =
number + 1
Try it out
You can try this rule out by running the following command:
Report parameters that are not used.
🔧 Running with
--fixwill automatically remove some of the reported errors.This rule looks within function arguments, let functions and lambdas to find any values that are unused. It will report any parameters that are not used.
Fixes for lambdas
We're only offering fixes for lambdas here because we believe unused parameters in functions are a code smell that should be refactored.
Fail
Value
somethingis not used:Success
Try it out
You can try this rule out by running the following command: