Current section
Files
Jump to
Current section
Files
rebar.config
% -*- mode: erlang; -*- vim: set ft=erlang:
%% == Erlang Compiler == %%
% but only 26+ is supported
{minimum_otp_vsn, "22"}.
{erl_opts, [
debug_info,
warn_export_vars,
warn_missing_spec,
warn_unused_import,
warnings_as_errors,
%
% EEP-48 doc attributes (OTP 27+)
{platform_define, "^2[7-9]\\.", 'E48'},
{platform_define, "^[3-9]", 'E48'}
]}.
%% == Dependencies and plugins ==
{deps, [
{cowboy, "~> 2.9"},
{hackney, ">= 1.17.0 and < 5.0.0"}
]}.
{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}/*.{hrl,erl}"
]}
]}.
%% == Dialyzer ==
{dialyzer, [
{warnings, [
error_handling,
underspecs,
unknown,
unmatched_returns
]},
{plt_extra_apps, [
common_test,
cowlib,
public_key,
ranch,
ssl
]}
]}.
%% == 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, [backwater]},
{config, "shell.config"}
]}
]},
{test, [
{erl_opts, [
debug_info,
nowarn_export_all,
nowarn_missing_spec,
nowarnings_as_errors
]},
{deps, [
{recon, "~> 2.5"}
]},
{cover_enabled, true},
{cover_opts, [verbose]}
]},
% The default build resolves ranch 2.x (pulled in by current cowboy); this
% profile pins the still-supported 1.x floor so CI can exercise both lines
% (see the extra ranch1 test step in .github/workflows/ci.yml).
{ranch1, [
{deps, [
{ranch, "~> 1.8"}
]}
]},
% Profiles for testing compatibility with previous versions of hackney
{hackney1, [
{deps, [
{hackney, "~> 1.17"}
]}
]},
{hackney2, [
{deps, [
{hackney, "~> 2.0"}
]}
]},
{hackney3, [
{deps, [
{hackney, "~> 3.0"}
]}
]}
]}.
%% == rebar3_hank ==
{hank, [
{ignore, [
"test/**",
% These headers deliberately centralize defaults / shared guard macros;
% some entries happen to be used by a single module, which is fine.
{"src/backwater_default_tweaks.hrl", [single_use_hrl_attrs]},
{"src/backwater_common.hrl", [single_use_hrl_attrs]}
]}
]}.
%% == Docs ==
% Necessary for ExDoc.
{edoc_opts, [
{preprocess, true},
{doclet, edoc_doclet_chunks},
{layout, edoc_layout_chunks},
{dir, "_build/docs/lib/backwater/doc"}
]}.