diff options
author | Heinz N. Gies <heinz@licenser.net> | 2015-09-21 06:58:48 +0200 |
---|---|---|
committer | Heinz N. Gies <heinz@licenser.net> | 2015-09-21 06:58:48 +0200 |
commit | cbbd8b60a1835a46882aacf1db326ee362ae67a7 (patch) | |
tree | 4ddc3b3e16e0d736b48db39df4e8dd62c0d53977 /src | |
parent | 59cbba3f1a43647b0d6eaca4ba4c8a00c4010f62 (diff) |
Shorten filenames slightly
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_dialyzer_format.erl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rebar_dialyzer_format.erl b/src/rebar_dialyzer_format.erl index 321d6e3..a6a6574 100644 --- a/src/rebar_dialyzer_format.erl +++ b/src/rebar_dialyzer_format.erl @@ -57,7 +57,7 @@ format_warning({Tag, {File, Line, _MFA}, Msg}, FOpt) -> format_warning({_Tag, {File, Line}, Msg}, FOpt) when is_list(File), is_integer(Line) -> F = case FOpt of - fullpath -> File; + fullpath -> re:replace(File, "^.*/_build/", "_build/"); basename -> filename:basename(File) end, String = lists:flatten(message_to_string(Msg)), @@ -371,9 +371,20 @@ highlight([N | Nr], N, C, [Arg | Rest]) -> highlight(Ns, N, C, [Arg | Rest]) -> [Arg | highlight(Ns, N + 1, C, Rest)]. +%% highlight([], _N, _C, Rest) -> +%% [[?NG, A, ?R] || A <- Rest]; + +%% highlight([N | Nr], N, C, [Arg | Rest]) -> +%% [[?NR, Arg, ?R] | highlight(Nr, N+1, C, Rest)]; + +%% highlight(Ns, N, C, [Arg | Rest]) -> +%% [[?NG, Arg, ?R] | highlight(Ns, N + 1, C, Rest)]. + seperate_args([$( | S]) -> seperate_args([], S, "", []). + + %% We strip this space since dialyzer is inconsistant in adding or not adding %% it .... seperate_args([], [$,, $\s | R], Arg, Args) -> |