[erlang-patches] Improve Dialyzer scan error messages

Magnus Henoch magnus@REDACTED
Tue Mar 26 13:58:42 CET 2013


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


git fetch git://github.com/legoscia/otp.git dialyzer-scan-error

https://github.com/legoscia/otp/compare/legoscia:dialyzer-scan-error
https://github.com/legoscia/otp/compare/legoscia:dialyzer-scan-error.patch

Regards,
Magnus



More information about the erlang-patches mailing list