summaryrefslogtreecommitdiff
path: root/src/rebar_dialyzer_format.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_dialyzer_format.erl')
-rw-r--r--src/rebar_dialyzer_format.erl9
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])).