Parcourir la source

Shorten filenames slightly

pull/823/head
Heinz N. Gies il y a 9 ans
Parent
révision
cbbd8b60a1
1 fichiers modifiés avec 12 ajouts et 1 suppressions
  1. +12
    -1
      src/rebar_dialyzer_format.erl

+ 12
- 1
src/rebar_dialyzer_format.erl Voir le fichier

@ -57,7 +57,7 @@ format_warning({Tag, {File, Line, _MFA}, Msg}, FOpt) ->
format_warning({_Tag, {File, Line}, Msg}, FOpt) when is_list(File), format_warning({_Tag, {File, Line}, Msg}, FOpt) when is_list(File),
is_integer(Line) -> is_integer(Line) ->
F = case FOpt of F = case FOpt of
fullpath -> File;
fullpath -> re:replace(File, "^.*/_build/", "_build/");
basename -> filename:basename(File) basename -> filename:basename(File)
end, end,
String = lists:flatten(message_to_string(Msg)), String = lists:flatten(message_to_string(Msg)),
@ -371,9 +371,20 @@ highlight([N | Nr], N, C, [Arg | Rest]) ->
highlight(Ns, N, C, [Arg | Rest]) -> highlight(Ns, N, C, [Arg | Rest]) ->
[Arg | highlight(Ns, N + 1, C, 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]) ->
seperate_args([], S, "", []). seperate_args([], S, "", []).
%% We strip this space since dialyzer is inconsistant in adding or not adding %% We strip this space since dialyzer is inconsistant in adding or not adding
%% it .... %% it ....
seperate_args([], [$,, $\s | R], Arg, Args) -> seperate_args([], [$,, $\s | R], Arg, Args) ->

Chargement…
Annuler
Enregistrer