View Source Dialyxir.Warning behaviour (Dialyxir v1.4.6)
Behaviour for defining warning semantics.
Contains callbacks for various warnings
Summary
Callbacks
Explanation for a warning of this type. Should include a simple example of how to trigger it.
The default documentation when seeing an error without the user otherwise overriding the format.
A short message, often missing things like success types and expected types for space.
By expressing the warning that is to be matched on, error handling and dispatching can be avoided in format functions.
Callbacks
@callback explain() :: String.t()
Explanation for a warning of this type. Should include a simple example of how to trigger it.
@callback format_long([String.t()] | {String.t(), String.t(), String.t()} | String.t()) :: String.t()
The default documentation when seeing an error without the user otherwise overriding the format.
@callback format_short([String.t()] | {String.t(), String.t(), String.t()} | String.t()) :: String.t()
A short message, often missing things like success types and expected types for space.
@callback warning() :: atom()
By expressing the warning that is to be matched on, error handling and dispatching can be avoided in format functions.
Functions
@spec default_explain() :: String.t()