|
|
|
|
|
by bostonvaulter2
2891 days ago
|
|
You should try Dialyxir 1.0.0-rc3! The error reporting is vastly improved by a GSoC student. Now you can get errors like this: ________________________________________________________________________________
apps/activity_feed/lib/activity_feed/push_notification_listener.ex:10:callback_type_mismatch
Callback mismatch for @callback push/2 in ActivityFeed.ListenerBehaviour behaviour.
Expected type:
{:error, _} | {:ok, _}
Actual type:
:ok
________________________________________________________________________________
apps/activity_feed/lib/activity_feed/push_notification_listener.ex:24:pattern_match
The pattern
_ = {:error, _}
can never match the type
:error | :ok
|
|
The lion's share of the work is now extracted into Erlex [1] which can be incorporated into other tools as needed.
[0] https://github.com/gabrielgatu/mix-dialyzer
[1] https://hex.pm/packages/erlex