%% == Erlang Compiler ==

{minimum_otp_vsn, "21.3"}.

{erl_opts, [
    debug_info,
    warn_export_vars,
    warn_unused_import,
    warnings_as_errors,
    {i, "src"}
]}.

%% == Dependencies and plugins ==

{deps, []}.

{project_plugins, [
    rebar3_ex_doc,
    rebar3_hank,
    rebar3_hex,
    rebar3_lint
]}.

%% == 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]},
        {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"]}
    ]}
]}.

%% == ex_doc ==

{ex_doc, [
    {extras, [
        {'README.md', #{ title => <<"Overview">> }},
        {'CHANGELOG.md', #{ title => <<"Changelog">> }}
    ]},
    {main, [<<"readme">>]}
]}.
{hex, [
    {doc, #{
        provider => ex_doc
    }}
]}.
