{minimum_otp_vsn, "29"}.
{erl_opts, [
debug_info,
warnings_as_errors,
warn_missing_spec,
warn_export_vars,
warn_unused_import,
warn_obsolete_guard
]}.
{deps, [
{telemetry, "1.4.2"}
]}.
{project_plugins, [
{erlfmt, "1.8.0"},
{rebar3_hank, "1.6.1"},
{rebar3_hex, "7.1.0"},
{rebar3_ex_doc, "0.2.31"}
]}.
{erlfmt, [
write,
{files, [
"rebar.config",
"src/*.{erl,hrl,app.src}",
"test/*.{erl,hrl}"
]}
]}.
{profiles, [
{test, [
{erl_opts, [nowarn_export_all, nowarn_missing_spec, {d, 'PROPER'}]},
{extra_src_dirs, [{"test", [{recursive, true}]}]},
{deps, [
{proper, "1.5.0"},
%% Used only by `scripts/bench.escript` (and the
%% `scripts/bench_matrix.sh` wrapper) so we can spin up
%% cowboy + elli listeners in peer BEAMs and measure
%% roadrunner against both. Test-profile-only to keep the
%% production dep list at one entry (telemetry).
{cowboy, "2.15.0"},
{elli, "3.3.0"}
]}
]}
]}.
{cover_enabled, true}.
{cover_export_enabled, true}.
{eunit_opts, [{sys_config, ["config/test.config"]}]}.
{ct_opts, [{sys_config, ["config/test.config"]}]}.
{dialyzer, [
{warnings, [unknown, unmatched_returns, error_handling]},
{plt_apps, top_level_deps},
{plt_extra_apps, [ssl, public_key, crypto]}
]}.
{xref_checks, [
undefined_function_calls,
undefined_functions,
locals_not_used,
deprecated_function_calls,
deprecated_functions
]}.
{hank, [
{ignore, [
%% Behaviour-defining modules — `-callback` decls are abstract
%% by design; implementors live in user code, so the rule's
%% "no caller within the module" check is a false positive.
{"src/roadrunner_handler.erl", unused_callbacks},
{"src/roadrunner_ws_handler.erl", unused_callbacks},
%% Common Test callbacks (`init_per_*`, `end_per_*`, per-testcase
%% `TestCase(Config)`) and eunit `{setup, S, Cleanup, Tests}`
%% cleanup arities are fixed by the framework — the `_Arg` style
%% is the convention but hank's `unnecessary_function_arguments`
%% rule still flags them.
{"test/roadrunner_http2_flow_control_SUITE.erl", unnecessary_function_arguments},
{"test/roadrunner_property_SUITE.erl", unnecessary_function_arguments},
{"test/roadrunner_tls_tests.erl", unnecessary_function_arguments},
{"test/roadrunner_conn_tests.erl", unnecessary_function_arguments}
]}
]}.
{shell, [
{apps, [roadrunner]}
]}.
{alias, [
{doc, [ex_doc]},
{precommit, [
{fmt, "--check"},
compile,
xref,
hank,
dialyzer,
ex_doc,
{eunit, "--cover"},
{ct, "--cover"},
{cover, "--verbose --min_coverage=100"}
]}
]}.
{ex_doc, [
{extras, [
"README.md",
"docs/comparison.md",
"docs/bench_results.md",
"docs/bench_internals.md",
"docs/resource_results.md",
"docs/wrk2_results.md",
"CONTRIBUTING.md",
"docs/roadmap.md",
"CHANGELOG.md",
"LICENSE.md"
]},
{groups_for_extras, [
{<<"Benchmarks">>, [
<<"docs/comparison.md">>,
<<"docs/bench_results.md">>,
<<"docs/bench_internals.md">>,
<<"docs/resource_results.md">>,
<<"docs/wrk2_results.md">>
]},
{<<"Project">>, [
<<"CONTRIBUTING.md">>,
<<"docs/roadmap.md">>,
<<"CHANGELOG.md">>,
<<"LICENSE.md">>
]}
]},
{main, "README.md"},
{api_reference, true},
{source_url, "https://github.com/arizona-framework/roadrunner"},
{prefix_ref_vsn_with_v, false},
%% Whitelist only public-API modules — internal helpers
%% (`roadrunner_conn*`, `roadrunner_http1`, `roadrunner_http2*`,
%% etc.) are implementation detail; their docstrings are
%% dev-reader narrative, not API contract.
{filter_modules,
"^roadrunner(_(handler|req|resp|router|listener|static|ws|ws_handler|middleware|http|cookie|qs|uri|sse|multipart))?$"}
]}.
{hex, [{doc, #{provider => ex_doc}}]}.