# `Dialyxir.Warning`
[🔗](https://github.com/jeremyjh/dialyxir/blob/1.4.8/lib/dialyxir/warning.ex#L1)

Behaviour for defining warning semantics.

Contains callbacks for various warnings

# `explain`

```elixir
@callback explain() :: String.t()
```

Explanation for a warning of this type. Should include a simple example of how to trigger it.

# `format_long`

```elixir
@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.

# `format_short`

```elixir
@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.

# `warning`

```elixir
@callback warning() :: atom()
```

By expressing the warning that is to be matched on, error handling
and dispatching can be avoided in format functions.

# `default_explain`

```elixir
@spec default_explain() :: String.t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
