# `DialyzerJson.FixHint`
[🔗](https://github.com/ZenHive/dialyzer_json/blob/main/lib/dialyzer_json/fix_hint.ex#L1)

Classifies dialyzer warning types into fix categories.

Categories help AI editors prioritize which warnings to fix first:

- `"spec"` - Likely needs typespec fix. The code is probably correct,
  but the @spec doesn't match what dialyzer inferred.

- `"code"` - Likely a real bug. The code has a problem that should be fixed,
  such as unreachable code, impossible pattern matches, or invalid calls.

- `"pattern"` - Common safe-to-ignore pattern. Often intentional or caused by
  third-party code (e.g., missing behaviour info, unused functions).

# `hint`

```elixir
@type hint() :: String.t()
```

Fix hint category string.

Possible values: `"spec"`, `"code"`, `"pattern"`, `"unknown"`

# `all_warning_types`

```elixir
@spec all_warning_types() :: [atom()]
```

Returns a list of all known warning types.

# `classify`

```elixir
@spec classify(atom()) :: hint()
```

Returns the fix hint for a warning type.

## Examples

    iex> DialyzerJson.FixHint.classify(:contract_diff)
    "spec"

    iex> DialyzerJson.FixHint.classify(:call)
    "code"

    iex> DialyzerJson.FixHint.classify(:unused_fun)
    "pattern"

    iex> DialyzerJson.FixHint.classify(:unknown_warning_type)
    "unknown"

# `warning_types_for`

```elixir
@spec warning_types_for(hint()) :: [atom()]
```

Returns warning types for a given category.

## Examples

    iex> :contract_diff in DialyzerJson.FixHint.warning_types_for("spec")
    true

---

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