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).
Summary
Functions
Returns a list of all known warning types.
Returns the fix hint for a warning type.
Returns warning types for a given category.
Types
@type hint() :: String.t()
Fix hint category string.
Possible values: "spec", "code", "pattern", "unknown"
Functions
@spec all_warning_types() :: [atom()]
Returns a list of all known warning types.
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"
Returns warning types for a given category.
Examples
iex> :contract_diff in DialyzerJson.FixHint.warning_types_for("spec")
true