OptimumCredo.Check.Refactor.WithElseManyClauses (OptimumCredo v0.5.0)
View SourceBasics
This check is disabled by default.
Learn how to enable it via .credo.exs.
This check has a base priority of low and works with any version of Elixir.
Explanation
A with with a long else usually means inner calls return ambiguous errors. Return
exact {:error, reason} values from the inner functions so the else shrinks or
disappears. Opt-in, low priority; counts clauses only.
Check-Specific Parameters
Use the following parameters to configure this check:
:min_else_clauses
Smallest else clause count that is reported.
This parameter defaults to 3.
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs config file.