소스 검색

Fix output issue (bug) when `dialyzer.warnings.unknown` is used in `rebar.config`

... and e.g. an unknown type is detected
pull/2351/head
Paulo F. Oliveira 4 년 전
부모
커밋
573906513f
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. +15
    -0
      src/rebar_dialyzer_format.erl

+ 15
- 0
src/rebar_dialyzer_format.erl 파일 보기

@ -27,6 +27,21 @@ format_warnings(Opts, Warnings) ->
%% If the last seen file is and the file of this warning are the same
%% `dialyzer_cl` returns _Filename = "", _Line = 0 for `unknown`
format_warning_(_Opts, Warning = {_Tag, {"" = _SrcFile0, 0 = Line}, Msg}, {_LastFile, Acc}) ->
SrcFile = "<path unknown>",
try
F = fmt("~!_c~ts", [SrcFile]),
String = message_to_string(Msg),
{SrcFile, [lists:flatten(fmt("~n~ts~n~!c~4w~!!: ~ts", [F, Line, String])) | Acc]}
catch
?WITH_STACKTRACE(Error, Reason, Stacktrace)
?DEBUG("Failed to pretty format warning: ~p:~p~n~p",
[Error, Reason, Stacktrace]),
{SrcFile, [dialyzer:format_warning(Warning, fullpath) | Acc]}
end;
%% we skip the file header
format_warning_(_Opts, Warning = {_Tag, {File, Line}, Msg}, {File, Acc}) ->
try

불러오는 중...
취소
저장