{erl_opts, [
    debug_info,
    {i, "include"},
    warnings_as_errors,
    warn_unused_vars,
    warn_export_all,
    warn_shadow_vars,
    warn_unused_import,
    warn_unused_function,
    warn_bif_clash,
    warn_unused_record,
    warn_deprecated_function,
    warn_obsolete_guard,
    warn_export_vars,
    warn_exported_vars
]}.

{deps, []}.

%% Project plugins
{project_plugins, [
    rebar3_hex,
    rebar3_ex_doc
]}.

%% Documentation with ex_doc
{ex_doc, [
    {extras, [
        {"README.md", #{title => "Overview"}}
    ]},
    {main, "readme"},
    {source_url, "https://github.com/macula-io/macula-tweann"},
    {prefix_ref_vsn_with_v, false}
]}.

%% Hex.pm package metadata
{hex, [
    {doc, #{provider => ex_doc}}
]}.

%% Test configuration
{eunit_opts, [
    verbose,
    {report, {eunit_surefire, [{dir, "_build/test/logs"}]}}
]}.

{cover_enabled, true}.
{cover_opts, [verbose]}.
{cover_export_enabled, true}.

%% Dialyzer configuration
{dialyzer, [
    {warnings, [
        unmatched_returns,
        error_handling,
        underspecs,
        unknown
    ]},
    {plt_apps, top_level_deps},
    {plt_extra_apps, [mnesia]},
    {plt_location, local},
    {base_plt_location, global}
]}.

%% Profiles
{profiles, [
    {test, [
        {erl_opts, [
            debug_info,
            nowarn_export_all,
            {i, "include"}
        ]},
        {deps, []},
        {extra_src_dirs, [
            "test/unit",
            "test/fixtures"
        ]}
    ]}
]}.

%% Shell configuration
{shell, [
    {apps, [macula_tweann]}
]}.

%% Documentation
{edoc_opts, [
    {title, "Macula TWEANN - Topology and Weight Evolving Artificial Neural Networks"},
    {source_path, ["src"]},
    {includes, ["include"]}
]}.

%% XRef configuration
{xref_checks, [
    undefined_function_calls,
    undefined_functions,
    locals_not_used,
    deprecated_function_calls,
    deprecated_functions
]}.
