Current section

Files

Jump to
Raw

rebar.config

% -*- mode: erlang; -*- vim: set ft=erlang:
%% == Erlang Compiler == %%
% but only 25+ is supported
{minimum_otp_vsn, "22"}.
{erl_opts, [
debug_info,
warn_export_vars,
warn_missing_spec,
warn_unused_import,
warnings_as_errors,
%
{platform_define, "^23\.[1-3]", 'HARDCODED_AUTHORITIES_UPDATER_SUPPORTED'},
{platform_define, "^2[4-9]", 'HARDCODED_AUTHORITIES_UPDATER_SUPPORTED'},
{platform_define, "^[3-9]", 'HARDCODED_AUTHORITIES_UPDATER_SUPPORTED'},
%
{platform_define, "^22\.", 'EXPIRED_CAs_ARE_CONSIDERED_VALID'},
{platform_define, "^23\.[0-2][^0-9]", 'EXPIRED_CAs_ARE_CONSIDERED_VALID'},
%
{platform_define, "^22\.", 'FLAKY_CROSS_SIGNING_VALIDATION'},
{platform_define, "^23\.[0-1][^0-9]", 'FLAKY_CROSS_SIGNING_VALIDATION'},
%
{platform_define, "^2[2-4]\.", 'NO_PUBLIC_KEY_CACERTS_GET'},
%
{platform_define, "^22\.", 'MISMATCHED_SNI_FAILS_HANDSHAKE'},
{platform_define, "^2[3-6]\.", 'MISMATCHED_SNI_CLOSES_CONN'},
{platform_define, "^27\.[0-2]\.", 'MISMATCHED_SNI_CLOSES_CONN'},
%
% EEP-48 doc attributes (OTP 27+)
{platform_define, "^2[7-9]\\.", 'E48'},
{platform_define, "^[3-9]", 'E48'}
]}.
%% == Dependencies and plugins ==
{deps, [
{ssl_verify_fun, "~> 1.1"}
]}.
{project_plugins, [
{erlfmt, "~> 1.7"},
% excluded on older OTP versions (see rebar.config.script)
{rebar3_hank, "~> 1.6"},
{rebar3_hex, "~> 7.1"},
% excluded on older OTP versions (see rebar.config.script)
{rebar3_lint, "~> 5.0"}
]}.
%% == Formatter ==
{erlfmt, [
write,
{files, [
"elvis.config",
"ex_doc.config",
"rebar.config",
"shell.config",
"{src,test,util}/*.{hrl,erl}"
]}
]}.
%% == Dialyzer ==
{dialyzer, [
%{plt_include_all_deps, true},
{warnings, [
error_handling,
underspecs,
unknown,
unmatched_returns
]},
{plt_extra_apps, [changelog_updater]}
]}.
%% == Xref ==
{xref_checks, [
deprecated_function_calls,
exports_not_used,
locals_not_used,
undefined_function_calls
]}.
%% == Profiles ==
{profiles, [
{shell, [
{erl_opts, [
nowarn_missing_spec,
nowarnings_as_errors
]},
{deps, [
{recon, "~> 2.5"}
]},
{shell, [
{apps, [tls_certificate_check]},
{config, "shell.config"}
]}
]},
{test, [
{erl_opts, [
debug_info,
nowarn_export_all,
nowarn_missing_spec,
nowarnings_as_errors
]},
{deps, [
{certifi, "~> 2.10"},
{meck, "~> 1.0"}
]},
{cover_enabled, true},
{cover_opts, [verbose]},
{eunit_tests, [
% Prevent eunit from failing because it detects additional modules
% under `test/tls_certificate_check_dependent_app_SUITE_data' and
% tries running tests in them.
{application, tls_certificate_check}
]}
]},
{elixir_test, [
{deps, [{castore, "0.1.20"}]},
{plugins, [{rebar_mix, "0.5.1"}]},
{provider_hooks, [{post, [{compile, {mix, consolidate_protocols}}]}]}
]},
{hardcoded_CAs_update, [
{erl_opts, [
{src_dirs, ["src", "util"]}
]},
{deps, [
{changelog_updater,
{git, "https://github.com/g-andrade/changelog_updater.git", {ref, "07b13ce"}}}
]},
{escript_incl_apps, [
tls_certificate_check,
changelog_updater
]},
{escript_name, "tls_certificate_check_hardcoded_CAs_updater"},
{escript_emu_args, "%%! -noinput\n"}
]}
]}.
%% == Hank ==
{hank, [
{ignore, [
"test/**"
]}
]}.
%% == Docs ==
% Necessary for ExDoc.
{edoc_opts, [
{preprocess, true},
{doclet, edoc_doclet_chunks},
{layout, edoc_layout_chunks},
{dir, "_build/docs/lib/tls_certificate_check/doc"}
]}.