towerops/.dialyzer_ignore.exs
Graham McIntire 2653e2516d dialyzer: expand PLT, drop blanket codebase suppression
Ignore file was silencing every warning under lib/towerops/**. Root
cause was plt_add_deps: :apps_direct missing Plug/Phoenix/Oban/Decimal
/Redix/ssl/public_key — hundreds of false `unknown_function` warnings
were being papered over.

Expand plt_add_apps to cover the common deps, narrow the ignore file
to real dep-PLT gaps only, and fix two concrete bugs uncovered by the
change:

- ScopedResource.fetch_preload/4: spec was atom() | [atom()] but
  callers pass keyword lists (e.g. [rules: :targets]).
- ToweropsNative: tag NIF stubs with @dialyzer :nowarn_function so
  dialyzer trusts the @spec instead of the fallback body.

Remaining 328 real warnings surface for follow-up.
2026-04-21 09:33:22 -05:00

37 lines
1.3 KiB
Elixir

# Dialyzer warnings to ignore.
#
# Dependency PLT gaps should be handled via `plt_add_apps` in mix.exs.
# Only suppress genuine false positives here — fix real warnings instead.
[
# Ecto.Type behaviour — callbacks aren't always exported
{"deps/ecto/lib/ecto/type.ex", :callback_info_missing},
# Oban.Worker behaviour — PLT gap
{"deps/oban/lib/oban/worker.ex", :callback_info_missing},
{"deps/oban/lib/oban/worker.ex", :unknown_function},
# Phoenix behaviours
{"deps/phoenix/lib/phoenix/endpoint.ex", :callback_info_missing},
{"deps/phoenix/lib/phoenix/router.ex", :callback_info_missing},
# Plug behaviours
{"deps/plug/lib/plug/debugger.ex", :unknown_function},
{"deps/plug/lib/plug/error_handler.ex", :unknown_function},
# Honeybadger
{"deps/honeybadger/lib/honeybadger/plug.ex", :unknown_function},
# Cloak
{"deps/cloak/lib/cloak/vault.ex", :unknown_function},
{"deps/cloak_ecto/lib/cloak_ecto/type.ex", :callback_info_missing},
{"deps/cloak_ecto/lib/cloak_ecto/types/binary.ex", :unknown_function},
# Vendored SnmpKit — out of scope for typing cleanup
~r/lib\/snmpkit/,
~r/lib\/snmp_lib/,
~r/src\/snmpkit/,
~r/src\/snmp_lib/,
# Gleam type system doesn't map 1:1 to Erlang's — artifacts, not bugs.
~r/src\/towerops\/.*\.gleam/
]