%% == Compiler and Profiles ==

{erl_opts, [warn_unused_import, warn_export_vars, warnings_as_errors, verbose, report, debug_info]}.

{minimum_otp_vsn, "26"}.

{profiles, [
    {test, [
        {extra_src_dirs, [{"test/examples", [{recursive, true}]}]},
        {deps, [{mixer, "1.2.0", {pkg, inaka_mixer}}, {meck, "1.0.0"}]},
        {ct_opts, [{sys_config, ["./config/test.config"]}, {logdir, "./logs"}, {verbose, true}]},
        {cover_enabled, true},
        {cover_opts, [verbose]},
        {dialyzer, [
            {warnings, [no_return, unmatched_returns, error_handling, underspecs, unknown]},
            {plt_extra_apps, [meck, dialyzer, common_test, compiler]}
        ]}
    ]}
]}.

{alias, [
    {
        test, [
            {fmt, "--check --verbose"},
            hank,
            xref,
            dialyzer,
            ct,
            cover
        ]
    }
]}.

{escript_main_app, elvis}.

{escript_name, "elvis"}.

%% == Dependencies and plugins ==

{deps, [{elvis_core, "4.2.3"}, {getopt, "1.0.3"}]}.

{project_plugins, [
    {rebar3_hank, "~> 1.4.1"},
    {rebar3_hex, "~> 7.0.11"},
    {erlfmt, "~> 1.7.0"},
    {rebar3_ex_doc, "~> 0.2.31"}
]}.

%% == Documentation ==

{ex_doc, [
    {source_url, <<"https://github.com/inaka/elvis">>},
    {extras, [<<"README.md">>, <<"CONTRIBUTING.md">>, <<"LICENSE">>]},
    {main, <<"README.md">>},
    {prefix_ref_vsn_with_v, false},
    {api_reference, false}
]}.

{hex, [{doc, #{provider => ex_doc}}]}.

%% == Format ==

{erlfmt, [
    write,
    {files, ["config/**/*.config", "src/**/*.app.src", "src/**/*.erl", "test/*.erl", "*.config"]}
]}.

%% == Dialyzer + XRef ==

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

{xref_checks, [undefined_function_calls, deprecated_function_calls, deprecated_functions]}.

{xref_extra_paths, ["test/**"]}.
