chore(bpapicheck): make some failures more user-friendly
This commit is contained in:
parent
0b9ac24c1e
commit
083e2da347
|
@ -244,19 +244,28 @@ get_param_types(Signatures, {M, F, A}) ->
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
dump() ->
|
dump() ->
|
||||||
case
|
RootDir = project_root_dir(),
|
||||||
{
|
TryRelDir = RootDir ++ "/_build/check/lib",
|
||||||
filelib:wildcard(project_root_dir() ++ "/*_plt"),
|
case {filelib:wildcard(RootDir ++ "/*_plt"), filelib:wildcard(TryRelDir)} of
|
||||||
filelib:wildcard(project_root_dir() ++ "/_build/check/lib")
|
|
||||||
}
|
|
||||||
of
|
|
||||||
{[PLT | _], [RelDir | _]} ->
|
{[PLT | _], [RelDir | _]} ->
|
||||||
dump(#{
|
dump(#{
|
||||||
plt => PLT,
|
plt => PLT,
|
||||||
reldir => RelDir
|
reldir => RelDir
|
||||||
});
|
});
|
||||||
_ ->
|
{[], _} ->
|
||||||
error("failed to guess run options")
|
logger:error(
|
||||||
|
"No usable PLT files found in \"~s\", abort ~n"
|
||||||
|
"Try running `rebar3 as check dialyzer` at least once first",
|
||||||
|
[RootDir]
|
||||||
|
),
|
||||||
|
error(run_failed);
|
||||||
|
{_, []} ->
|
||||||
|
logger:error(
|
||||||
|
"No built applications found in \"~s\", abort ~n"
|
||||||
|
"Try running `rebar3 as check compile` at least once first",
|
||||||
|
[TryRelDir]
|
||||||
|
),
|
||||||
|
error(run_failed)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%% Collect the local BPAPI modules to a dump file
|
%% Collect the local BPAPI modules to a dump file
|
||||||
|
|
Loading…
Reference in New Issue