소스 검색

Add all subdirs to xref library path

pull/3/head
Daniel Luna 12 년 전
committed by Dave Smith
부모
커밋
b1a947488b
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. +7
    -4
      src/rebar_xref.erl

+ 7
- 4
src/rebar_xref.erl 파일 보기

@ -44,7 +44,7 @@
xref(Config, _) ->
%% Spin up xref
{ok, _} = xref:start(xref),
ok = xref:set_library_path(xref, code_path()),
ok = xref:set_library_path(xref, code_path(Config)),
xref:set_default(xref, [{warnings,
rebar_config:get(Config, xref_warnings, false)},
@ -132,9 +132,12 @@ check_query({Query, Value}) ->
true
end.
code_path() ->
[P || P <- code:get_path(),
filelib:is_dir(P)] ++ [filename:join(rebar_utils:get_cwd(), "ebin")].
code_path(Config) ->
BaseDir = rebar_config:get_xconf(Config, base_dir),
[P || P <- code:get_path() ++
[filename:join(BaseDir, filename:join(SubDir, "ebin"))
|| SubDir <- rebar_config:get(Config, sub_dirs, [])],
filelib:is_dir(P)].
%%
%% Ignore behaviour functions, and explicitly marked functions

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