Disclaimer: I'm a maintainer but the next Dialyxir release makes a major improvement on this, thanks to contributions from Andrew Summers. He wrote a parser for the Erlangified term strings and uses the Elixir (1.6) pretty printer to print all the terms the way Elixir would. We're still fine-tuning the error messages and explanations but there is an RC on hex[0] - give it a spin if you haven't yet.
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
Not quite -- that was me =). The GSOC student (Gabriel Gatu) is incorporating that work along with the incremental Dialyzer from the Elixir-ls project, and taking some of the new Dialyxir errors and morphing them a bit into a task that can be eventually merged back upstream into a more mainline mix task. You can track his progress here [0].
The lion's share of the work is now extracted into Erlex [1] which can be incorporated into other tools as needed.
Ooops! Sorry for getting that mixed up! erlex sounds like a neat project! I hope you make an Elixir Forum post about it so that more people are aware of it, I think it probably has quite a few good uses.
No trouble! I had unfortunate (or perhaps fortunate for Gabriel!) timing with its completion. Making a forum post is a good call! I need to throw some more docs in there, but I'll make one after that's in decent shape.
[0] https://hex.pm/packages/dialyxir/1.0.0-rc.3