View Source CompassCredoPlugin.Check.DefdelegateOrder (compass_credo_plugin v0.1.1)
This check has a base priority of normal
and works with any version of Elixir.
explanation
Explanation
Prefer placing defdelegate before public and private functions.
# Less preferred defmodule App.UserView do
alias App.SharedView
# All the other module attributes, directives, and macros go here ...
# All the normal functions go here ...
defdelegate formatted_username(user), to: SharedView
end
# Preferred defmodule App.UserView do
alias App.SharedView
# All the other module attributes, directives, and macros go here ...
defdelegate formatted_username(user), to: SharedView
# All the normal functions go here ...
end
check-specific-parameters
Check-Specific Parameters
There are no specific parameters for this check.
general-parameters
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs
config file.