Skip to content

Commit

Permalink
Move Xref and Dialyzer options from workflows to rebar.config
Browse files Browse the repository at this point in the history
And also include some more applications in Dialyzer plt_extra_apps,
which apparently is required since Erlang 26.
  • Loading branch information
badlop committed Jun 8, 2023
1 parent 397a08a commit 3263e81
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 22 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,6 @@ jobs:
sudo apt-get -qq install libexpat1-dev libgd-dev libpam0g-dev \
libsqlite3-dev libwebp-dev libyaml-dev
- name: Prepare rebar
run: |
echo '{xref_ignores, [{eldap_filter_yecc, return_error, 2}
]}.' >>rebar.config
echo '{xref_checks, [deprecated_function_calls, deprecated_functions,
locals_not_used, undefined_function_calls, undefined_functions]}.
% Disabled: exports_not_used,' >>rebar.config
echo '{dialyzer, [{get_warnings, true}, {plt_extra_apps, [cache_tab,
eimp, epam, esip, ezlib, fast_tls, fast_xml, fast_yaml,
mqtree, p1_acme, p1_mysql, p1_oauth2, p1_pgsql, p1_utils, pkix,
sqlite3, stringprep, stun, xmpp, yconf]} ]}.' >>rebar.config
echo "{ct_opts, [{keep_logs, 20}]}." >>rebar.config
- name: Remove syntax_tools from release
run: sed -i 's|, syntax_tools||g' src/ejabberd.app.src.script

Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ jobs:
make update
make
- name: Prepare rebar
run: |
echo '{xref_ignores, [{eldap_filter_yecc, return_error, 2}
]}.' >>rebar.config
echo '{xref_checks, [deprecated_function_calls, deprecated_functions,
locals_not_used, undefined_function_calls, undefined_functions]}.
% Disabled: exports_not_used,' >>rebar.config
- run: make xref

- name: Test rel (rebar2)
Expand Down
29 changes: 28 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,16 @@

{xref_warnings, false}.

{xref_checks, [deprecated_function_calls]}.
{if_rebar3,
{xref_checks,
[deprecated_function_calls, deprecated_functions, locals_not_used,
undefined_function_calls, undefined_functions]}
}.
{if_not_rebar3,
{xref_checks,
[deprecated_function_calls, deprecated_functions,
undefined_function_calls, undefined_functions]}
}.

{xref_exclusions, [
"(\"gen_transport\":_/_)",
Expand All @@ -189,9 +198,27 @@
{if_var_false, sqlite, "(\"sqlite3\":_/_)"},
{if_var_false, zlib, "(\"ezlib\":_/_)"}]}.

{xref_ignores, [{eldap_filter_yecc, return_error, 2} ]}.

{eunit_compile_opts, [{i, "tools"},
{i, "include"}]}.

{dialyzer, [{get_warnings, false}, % Show warnings of dependencies
{if_version_above, "25",
{plt_extra_apps,
[asn1, odbc, public_key, stdlib, syntax_tools,
eredis, idna, jiffy, luerl, jose,
cache_tab, eimp, epam, esip, ezlib, fast_tls, fast_xml, fast_yaml,
mqtree, p1_acme, p1_mysql, p1_oauth2, p1_pgsql, p1_utils, pkix,
sqlite3, stringprep, stun, xmpp, yconf]},
{plt_extra_apps, % For Erlang/OTP 25 and older
[cache_tab, eimp, epam, esip, ezlib, fast_tls, fast_xml, fast_yaml,
mqtree, p1_acme, p1_mysql, p1_oauth2, p1_pgsql, p1_utils, pkix,
sqlite3, stringprep, stun, xmpp, yconf]}
} ]}.

{ct_opts, [{keep_logs, 20}]}.

{cover_enabled, true}.
{cover_export_enabled, true}.
{coveralls_coverdata, "_build/test/cover/ct.coverdata"}.
Expand Down

0 comments on commit 3263e81

Please sign in to comment.