mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 03:00:17 +00:00
Add all subdirs to xref library path
This commit is contained in:
parent
2b5844d14c
commit
b1a947488b
1 changed files with 7 additions and 4 deletions
|
@ -44,7 +44,7 @@
|
||||||
xref(Config, _) ->
|
xref(Config, _) ->
|
||||||
%% Spin up xref
|
%% Spin up xref
|
||||||
{ok, _} = xref:start(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,
|
xref:set_default(xref, [{warnings,
|
||||||
rebar_config:get(Config, xref_warnings, false)},
|
rebar_config:get(Config, xref_warnings, false)},
|
||||||
|
@ -132,9 +132,12 @@ check_query({Query, Value}) ->
|
||||||
true
|
true
|
||||||
end.
|
end.
|
||||||
|
|
||||||
code_path() ->
|
code_path(Config) ->
|
||||||
[P || P <- code:get_path(),
|
BaseDir = rebar_config:get_xconf(Config, base_dir),
|
||||||
filelib:is_dir(P)] ++ [filename:join(rebar_utils:get_cwd(), "ebin")].
|
[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
|
%% Ignore behaviour functions, and explicitly marked functions
|
||||||
|
|
Loading…
Reference in a new issue