[erlang-patches] Improve Dialyzer scan error messages

Fredrik fredrik@REDACTED
Thu Mar 28 14:19:11 CET 2013


On 03/26/2013 02:29 PM, Kostis Sagonas wrote:
> 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
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
Fetched,
Thanks!

-- 

BR Fredrik Gustafsson
Erlang OTP Team




More information about the erlang-patches mailing list