NOTE: the latest version is 1.0.2
Reports when a variable between case .. of is used in any of the cases
case .. of
config = [ VariablesBetweenCaseOf.AccessInCases.forbid ]
case arguments of [] -> "no arguments" _ :: _ -> arguments |> String.join ", "
The rule collects variables even inside tuples, variants and lists.
case arguments of [] -> "no arguments" firstArg :: args1Up -> (firstArg :: args1Up) |> String.join ", "
The rule does not collect variables inside records, functions, operations, ...
case originalList |> List.drop 4 of [] -> "less than 5 arguments" _ :: _ originalList |> String.join ", "
This rule is not useful when you would fix
case list of [] -> "no arguments" _ :: _ -> list |> String.join ", "
to
case list of [] -> "no arguments" list_ -> list_ |> String.join ", "
That's not the purpose of this rule!
The motivation is preventing you from forgetting to use certain information and referring to the wrong variables. For more details, check the readme
Reports when a variable between
case .. ofis used in any of the casesreported
The rule collects variables even inside tuples, variants and lists.
not reported
The rule does not collect variables inside records, functions, operations, ...
When (not) to use
This rule is not useful when you would fix
to
That's not the purpose of this rule!
The motivation is preventing you from forgetting to use certain information and referring to the wrong variables. For more details, check the readme