diff options
author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-09-27 20:20:42 -0500 |
---|---|---|
committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-09-27 20:20:42 -0500 |
commit | cf78543991cd626515624910494865d33ebdf46f (patch) | |
tree | 9737d639acd3e64de93cdbc41eae5fc65faf7f2a /src/rebar_dialyzer_format.erl | |
parent | f80dd6b88aea839e2a780bad858cb878eeff3df1 (diff) | |
parent | 0839efda57d39469cc89c40b03814768f0d538e5 (diff) |
Merge pull request #841 from tsloughter/dialyzer_warnings
fix dialyzer warnings
Diffstat (limited to 'src/rebar_dialyzer_format.erl')
-rw-r--r-- | src/rebar_dialyzer_format.erl | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/rebar_dialyzer_format.erl b/src/rebar_dialyzer_format.erl index fbda8d0..0fd2b6e 100644 --- a/src/rebar_dialyzer_format.erl +++ b/src/rebar_dialyzer_format.erl @@ -31,12 +31,9 @@ fmt(Fmt, Args) -> format_warning({Tag, {File, Line, _MFA}, Msg}, FOpt) -> format_warning({Tag, {File, Line}, Msg}, FOpt); -format_warning({_Tag, {File, Line}, Msg}, FOpt) when is_list(File), - is_integer(Line) -> - F = case FOpt of - fullpath -> re:replace(File, "^.*/_build/", "_build/"); - basename -> filename:basename(File) - end, +format_warning({_Tag, {File, Line}, Msg}, fullpath) when is_list(File), + is_integer(Line) -> + F = re:replace(File, "^.*/_build/", "_build/"), String = lists:flatten(message_to_string(Msg)), lists:flatten(fmt("~s:~w~n~s", [F, Line, String])). |