ci(xref): handle non-existing apps/modules

This commit is contained in:
William Yang 2022-09-02 10:06:09 +02:00
parent 8b6b9a0d20
commit fef088220c
1 changed files with 8 additions and 4 deletions

View File

@ -18,12 +18,16 @@ main(_) ->
xref:set_default(Name, [{verbose,false}, {warnings,false}]),
xref:add_release(Name, "_build/emqx/rel/emqx/lib/"),
xref:add_application(Name, code:lib_dir(erts)),
[ok = xref:remove_application(Name, App) ||
App <- ExclApps
[ case xref:remove_application(Name, App) of
ok -> ok;
{error, xref_base, {no_such_application, _}} -> ok
end || App <- ExclApps
],
[ok = xref:remove_module(Name, M) ||
M <- ExclMods
[case xref:remove_module(Name, M) of
ok -> ok;
{error, M, _R} -> ok
end || M <- ExclMods
],
ModuleInfos = xref:info(Name, modules),
LibInfos = xref:info(Name, modules),