Basics
This check is disabled by default.
Learn how to enable it via .credo.exs.
This check has a base priority of normal and works with any version of Elixir.
Explanation
Attributes like email, username, or slug are almost always
intended to be unique. Add a corresponding identity:
identities do
identity :unique_email, [:email]
endCheck-Specific Parameters
Use the following parameters to configure this check:
:identity_candidates
Attribute names that should have a uniqueness identity.
This parameter defaults to [:email, :username, :slug, :handle, :phone].
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs config file.