diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 563fbda03..8252d0633 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/runtime.yml b/.github/workflows/runtime.yml index e42908d22..a27203ba3 100644 --- a/.github/workflows/runtime.yml +++ b/.github/workflows/runtime.yml @@ -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) diff --git a/rebar.config b/rebar.config index def6f349c..0f954ae85 100644 --- a/rebar.config +++ b/rebar.config @@ -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\":_/_)", @@ -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"}.