Merge pull request #7932 from ieQu1/bpapi-sort-versions
fix(bpapi): Sort versions
This commit is contained in:
commit
4c844eba95
2
Makefile
2
Makefile
|
@ -73,7 +73,7 @@ ct: $(REBAR) conf-segs
|
||||||
|
|
||||||
.PHONY: static_checks
|
.PHONY: static_checks
|
||||||
static_checks:
|
static_checks:
|
||||||
@$(REBAR) as check do xref, dialyzer, ct --suite apps/emqx/test/emqx_static_checks --readable $(CT_READABLE)
|
@$(REBAR) as check do dialyzer, xref, ct --suite apps/emqx/test/emqx_static_checks --readable $(CT_READABLE)
|
||||||
|
|
||||||
APPS=$(shell $(CURDIR)/scripts/find-apps.sh)
|
APPS=$(shell $(CURDIR)/scripts/find-apps.sh)
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,28 @@
|
||||||
{emqx,1}.
|
{emqx,1}.
|
||||||
{emqx_rule_engine,1}.
|
|
||||||
{emqx_bridge,1}.
|
|
||||||
{emqx_authn,1}.
|
{emqx_authn,1}.
|
||||||
{emqx_authz,1}.
|
{emqx_authz,1}.
|
||||||
|
{emqx_bridge,1}.
|
||||||
{emqx_broker,1}.
|
{emqx_broker,1}.
|
||||||
{emqx_cm,1}.
|
{emqx_cm,1}.
|
||||||
{emqx_conf,1}.
|
{emqx_conf,1}.
|
||||||
{emqx_dashboard,1}.
|
{emqx_dashboard,1}.
|
||||||
|
{emqx_delayed,1}.
|
||||||
{emqx_exhook,1}.
|
{emqx_exhook,1}.
|
||||||
|
{emqx_gateway_api_listeners,1}.
|
||||||
{emqx_gateway_cm,1}.
|
{emqx_gateway_cm,1}.
|
||||||
|
{emqx_gateway_http,1}.
|
||||||
|
{emqx_license,1}.
|
||||||
{emqx_management,1}.
|
{emqx_management,1}.
|
||||||
{emqx_mgmt_api_plugins,1}.
|
{emqx_mgmt_api_plugins,1}.
|
||||||
{emqx_license,1}.
|
{emqx_mgmt_cluster,1}.
|
||||||
{emqx_mgmt_trace,1}.
|
{emqx_mgmt_trace,1}.
|
||||||
{emqx_persistent_session,1}.
|
{emqx_persistent_session,1}.
|
||||||
{emqx_plugin_libs,1}.
|
{emqx_plugin_libs,1}.
|
||||||
{emqx_prometheus,1}.
|
{emqx_prometheus,1}.
|
||||||
{emqx_resource,1}.
|
{emqx_resource,1}.
|
||||||
|
{emqx_retainer,1}.
|
||||||
|
{emqx_rule_engine,1}.
|
||||||
{emqx_slow_subs,1}.
|
{emqx_slow_subs,1}.
|
||||||
{emqx_statsd,1}.
|
{emqx_statsd,1}.
|
||||||
{emqx_telemetry,1}.
|
{emqx_telemetry,1}.
|
||||||
{emqx_topic_metrics,1}.
|
{emqx_topic_metrics,1}.
|
||||||
{emqx_delayed,1}.
|
|
||||||
{emqx_mgmt_cluster,1}.
|
|
||||||
{emqx_retainer,1}.
|
|
||||||
{emqx_gateway_http,1}.
|
|
||||||
{emqx_gateway_api_listeners,1}.
|
|
||||||
|
|
||||||
|
|
|
@ -61,14 +61,12 @@
|
||||||
% TODO: handle pmap
|
% TODO: handle pmap
|
||||||
-define(IGNORED_RPC_CALLS, "gen_rpc:nodes/0, emqx_rpc:unwrap_erpc/1").
|
-define(IGNORED_RPC_CALLS, "gen_rpc:nodes/0, emqx_rpc:unwrap_erpc/1").
|
||||||
%% List of business-layer functions that are exempt from the checks:
|
%% List of business-layer functions that are exempt from the checks:
|
||||||
|
%% erlfmt-ignore
|
||||||
-define(EXEMPTIONS,
|
-define(EXEMPTIONS,
|
||||||
% Reason: legacy code. A fun and a QC query are
|
"emqx_mgmt_api:do_query/6," % Reason: legacy code. A fun and a QC query are
|
||||||
"emqx_mgmt_api:do_query/6,"
|
|
||||||
% passed in the args, it's futile to try to statically
|
% passed in the args, it's futile to try to statically
|
||||||
% check it
|
% check it
|
||||||
|
"emqx_plugin_libs_rule:cluster_call/3" % Reason: some sort of external plugin API that we
|
||||||
% Reason: some sort of external plugin API that we
|
|
||||||
"emqx_plugin_libs_rule:cluster_call/3"
|
|
||||||
% don't want to break?
|
% don't want to break?
|
||||||
).
|
).
|
||||||
|
|
||||||
|
@ -220,7 +218,7 @@ dump() ->
|
||||||
case
|
case
|
||||||
{
|
{
|
||||||
filelib:wildcard(project_root_dir() ++ "/*_plt"),
|
filelib:wildcard(project_root_dir() ++ "/*_plt"),
|
||||||
filelib:wildcard(project_root_dir() ++ "/_build/emqx*/lib")
|
filelib:wildcard(project_root_dir() ++ "/_build/check/lib")
|
||||||
}
|
}
|
||||||
of
|
of
|
||||||
{[PLT | _], [RelDir | _]} ->
|
{[PLT | _], [RelDir | _]} ->
|
||||||
|
@ -260,22 +258,11 @@ prepare(#{reldir := RelDir, plt := PLT}) ->
|
||||||
logger:info("Loading PLT...", []),
|
logger:info("Loading PLT...", []),
|
||||||
dialyzer_plt:from_file(PLT).
|
dialyzer_plt:from_file(PLT).
|
||||||
|
|
||||||
|
%% erlfmt-ignore
|
||||||
find_remote_calls(_Opts) ->
|
find_remote_calls(_Opts) ->
|
||||||
Query =
|
Query =
|
||||||
"XC | (A - ["
|
"XC | (A - ["?IGNORED_APPS"]:App - ["?IGNORED_MODULES"]:Mod - ["?EXEMPTIONS"])
|
||||||
?IGNORED_APPS
|
|| ((["?RPC_MODULES"] : Mod + ["?RPC_FUNCTIONS"]) - ["?IGNORED_RPC_CALLS"])",
|
||||||
"]:App - ["
|
|
||||||
?IGNORED_MODULES
|
|
||||||
"]:Mod - ["
|
|
||||||
?EXEMPTIONS
|
|
||||||
"])\n"
|
|
||||||
" || ((["
|
|
||||||
?RPC_MODULES
|
|
||||||
"] : Mod + ["
|
|
||||||
?RPC_FUNCTIONS
|
|
||||||
"]) - ["
|
|
||||||
?IGNORED_RPC_CALLS
|
|
||||||
"])",
|
|
||||||
{ok, Calls} = xref:q(?XREF, Query),
|
{ok, Calls} = xref:q(?XREF, Query),
|
||||||
logger:info("Calls to RPC modules ~p", [Calls]),
|
logger:info("Calls to RPC modules ~p", [Calls]),
|
||||||
{Callers, _Callees} = lists:unzip(Calls),
|
{Callers, _Callees} = lists:unzip(Calls),
|
||||||
|
|
Loading…
Reference in New Issue