%% == Erlang Compiler ==

{minimum_otp_vsn, "21.3"}.

{erl_opts, [
    debug_info,
    warn_export_vars,
    warn_missing_spec,
    warn_unused_import,
    warnings_as_errors,
    {i, "src"},
    {platform_define, "^(R|1|(20)|(21)|(22.0))", old_hmac_api}
]}.

%% == Dependencies and plugins ==

{deps, []}.

{project_plugins, [
    {eqc_rebar, {git, "https://github.com/Quviq/eqc-rebar", {tag, "1.1.0"}}},
    {rebar3_hex, "6.10.3"},
    {rebar3_lint, "0.3.2"}
]}.

%% == Dialyzer ==

{dialyzer, [
    {warnings, [
        error_handling,
        underspecs,
        unknown,
        unmatched_returns
    ]}
]}.

%% == Xref ==

{xref_checks, [
    deprecated_function_calls,
    exports_not_used,
    locals_not_used,
    undefined_function_calls
]}.

%% == Profiles ==

{profiles, [
    {test, [
        {cover_enabled, true},
        {cover_opts, [verbose]},
        {dialyzer, [
            {plt_extra_apps, [eunit]}
        ]},
        {erl_opts, [
            debug_info,
            nowarn_export_all,
            nowarn_missing_spec,
            nowarn_missing_spec_all,
            warn_export_vars,
            warn_unused_import,
            warnings_as_errors
        ]},
        {extra_src_dirs, [{"test", [{recursive, true}]}]},
        {xref_extra_paths, ["test"]}
    ]}
]}.

%% == EDoc ==

{edoc_opts, [
    {includes, ["src"]},
    {preprocess, true}
]}.
