{minimum_otp_vsn, "27"}.
{erl_opts, [
debug_info,
warn_missing_spec,
warnings_as_errors,
warn_unused_vars,
warn_shadow_vars,
warn_unused_import,
warn_obsolete_guard
]}.
{deps, []}.
{project_plugins, [
erlfmt,
rebar3_hank,
rebar3_ex_doc,
rebar3_hex
]}.
{hex, [
{doc, ex_doc},
{build_tools, ["rebar3"]},
{files, [
"src",
"priv",
"rebar.config",
"README.md",
"LICENSE",
"CHANGELOG.md"
]}
]}.
{ex_doc, [
{extras, [
{<<"README.md">>, #{title => <<"Overview">>}},
{<<"CHANGELOG.md">>, #{title => <<"Changelog">>}},
{<<"LICENSE">>, #{title => <<"License">>}}
]},
{main, <<"README.md">>},
{homepage_url, <<"https://github.com/nomasystems/nquic">>},
{source_url, <<"https://github.com/nomasystems/nquic">>},
{api_reference, true},
{groups_for_modules, [
{<<"Public API">>, [
nquic,
nquic_conn,
nquic_lib,
nquic_socket,
nquic_zero_rtt,
nquic_session_cache
]},
{<<"Wire Format">>, [
nquic_frame,
nquic_packet,
nquic_packet_number,
nquic_varint,
nquic_transport
]},
{<<"Cryptography">>, [
nquic_tls,
nquic_crypto,
nquic_keys,
nquic_hp
]},
{<<"Connection Management">>, [
nquic_conn_statem,
nquic_handshake,
nquic_frame_handler,
nquic_packet_io,
nquic_path,
nquic_stateless_reset
]},
{<<"Stream Management">>, [
nquic_stream_statem,
nquic_stream_manager,
nquic_flow
]},
{<<"Loss Detection and Congestion Control">>, [
nquic_loss,
nquic_rtt,
nquic_cc,
nquic_cc_cubic,
nquic_cc_newreno
]},
{<<"Server Infrastructure">>, [
nquic_listener,
nquic_receiver,
nquic_server_sup,
nquic_recv
]}
]}
]}.
{erlfmt, [
write,
{files, [
"src/*.erl",
"src/*.hrl",
"test/*.erl",
"test/interop/*.erl",
"rebar.config"
]}
]}.
{xref_checks, [
undefined_function_calls,
undefined_functions,
locals_not_used,
deprecated_function_calls,
deprecated_functions
]}.
{dialyzer, [
{warnings, [
unmatched_returns,
error_handling,
unknown,
extra_return,
missing_return
]},
{plt_extra_apps, [public_key, ssl, crypto]}
]}.
{cover_enabled, true}.
{cover_opts, [verbose, {min_coverage, 85}]}.
{eunit_opts, [
verbose,
{skip_deps, true},
{dir, "test"}
]}.
%% Exclude interop tests from standard eunit/ct runs
{ct_opts, [
{verbose, true},
{dir, "test"}
]}.
{hank, [
{ignore, [
"test/*.erl",
"test/interop/*.erl"
]}
]}.
{alias, [
{check, [compile, {fmt, "--check"}, xref, dialyzer, hank]},
{test, [ct, eunit, cover]}
]}.
{shell, [
%% {config, "config/sys.config"},
{apps, [nquic]}
]}.
{profiles, [
{test, [
{deps, [
{triq, {git, "https://github.com/nomasystems/triq.git", {branch, "master"}}}
]},
{erl_opts, [nowarn_missing_spec]},
%% test/interop sources are compiled into the test profile so EUnit
%% can resolve them, even though they're only invoked from the
%% interop scripts. Keeps `test/` self-contained.
{extra_src_dirs, ["test/prop", "test/interop", "test/support"]}
]},
{interop, [
{erl_opts, [nowarn_missing_spec]},
{extra_src_dirs, ["test/interop", "test/support"]}
]}
]}.