소스 검색

Merge pull request #1591 from MikhailKalashnikov/fix-xref-cleanup-code-path

Fix cleanup_code_path for xref compile hook
pull/1596/head
Fred Hebert 7 년 전
committed by GitHub
부모
커밋
330baef58f
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. +2
    -1
      src/rebar_prv_xref.erl

+ 2
- 1
src/rebar_prv_xref.erl 파일 보기

@ -36,6 +36,7 @@ init(State) ->
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
do(State) ->
OldPath = code:get_path(),
code:add_pathsa(rebar_state:code_paths(State, all_deps)),
XrefChecks = prepare(State),
XrefIgnores = rebar_state:get(State, xref_ignores, []),
@ -47,7 +48,7 @@ do(State) ->
QueryChecks = rebar_state:get(State, xref_queries, []),
QueryResults = lists:foldl(fun check_query/2, [], QueryChecks),
stopped = xref:stop(xref),
rebar_utils:cleanup_code_path(rebar_state:code_paths(State, default)),
rebar_utils:cleanup_code_path(OldPath),
case XrefResults =:= [] andalso QueryResults =:= [] of
true ->
{ok, State};

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