%% == Compiler and Profiles ==

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

{minimum_otp_vsn, "26"}.

{profiles, [{test, [{cover_enabled, true}, {cover_opts, [verbose]}, {ct_opts, [{verbose, true}]}]}]}.

{alias, [{test, [compile, lint, xref, dialyzer, ct, cover]}]}.

%% == Dependencies and plugins ==

{project_plugins, [
    {rebar3_hank, "~> 1.4.0"},
    {rebar3_hex, "~> 7.0.7"},
    {erlfmt, "~> 1.6.2"},
    {rebar3_lint, "~> 3.1.0"},
    {rebar3_ex_doc, "~> 0.2.20"}
]}.

%% == Documentation ==

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

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

%% == Format ==

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

%% == Dialyzer + XRef ==

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

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

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