[erlang-patches] Improve Dialyzer scan error messages
Kostis Sagonas
kostis@REDACTED
Tue Mar 26 14:29:37 CET 2013
On 03/26/2013 01:58 PM, Magnus Henoch wrote:
> Here is a patch that improves the output from Dialyzer when it fails to
> scan a file. In my experience this usually happens because of a missing
> parse transform, but the same applies to Erlang files with syntax
> errors.
>
> This is the output from running "dialyzer --src" on an empty file
> without this patch:
>
> dialyzer: Analysis failed with error:
> Could not scan the following file(s): [{"/tmp/foo.erl",
> ["/tmp/foo.erl:1: no module definition\n"]}]
>
> And with the patch:
>
> dialyzer: Analysis failed with error:
> Could not scan the following file(s):
> /tmp/foo.erl:1: no module definition
Some comments:
A more convincing example, perhaps with more than one "failing" file,
would help (me at least) appreciate the great improvement that this
patch provides. Also, one should check how this change affects the
Erlang interface of dialyzer (that of dialyzer:run). Finally, I am not
sure I like the extra new line, but that's perhaps a minor point.
Kostis
More information about the erlang-patches
mailing list