OptimumCredo.Check.Readability.DefaultCallbackDefined (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
Do not define mount/3, mount/1 or update/2 when the body equals the default
behaviour. Only single-clause, guard-free definitions with ignored arguments are
reported. Opt-in, low priority.
Bad
def mount(_params, _session, socket), do: {:ok, socket}Good
Omit the callback.
Check-Specific Parameters
There are no specific parameters for this check.
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs config file.