summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Fish <james@fishcakez.com>2014-11-19 18:17:17 +0000
committerJames Fish <james@fishcakez.com>2014-11-20 16:05:03 +0000
commit16b2dae066484f44e28f707cb58326da0d217bb5 (patch)
tree11624a18519f6ea7396c3724cdf19733d394e506
parent62e7cc27da361f6c6f63bef1e6588235e1e19609 (diff)
Improve formatting of dialyzer errors
Strip ":0: " from unknown type/function/behaviour warnings
-rw-r--r--src/rebar_prv_dialyzer.erl10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rebar_prv_dialyzer.erl b/src/rebar_prv_dialyzer.erl
index 7bbaf81..f5d840d 100644
--- a/src/rebar_prv_dialyzer.erl
+++ b/src/rebar_prv_dialyzer.erl
@@ -211,7 +211,15 @@ run_dialyzer(State, Opts) ->
{ok, State}.
format_warning(Warning) ->
- string:strip(dialyzer:format_warning(Warning), right, $\n).
+ string:strip(dialyzer_format_warning(Warning), right, $\n).
+
+dialyzer_format_warning(Warning) ->
+ case dialyzer:format_warning(Warning) of
+ ":0: " ++ Warning2 ->
+ Warning2;
+ Warning2 ->
+ Warning2
+ end.
default_warnings() ->
[error_handling,