%% == Compiler and Profiles ==

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

{minimum_otp_vsn, "23"}.

{profiles,
 [{test,
   [{extra_src_dirs, ["test/examples"]},
    {deps, [{meck, "0.9.2"}]},
    {erl_opts, [nowarn_missing_spec, nowarn_export_all]},
    {dialyzer, [{warnings, [no_return, error_handling]}, {plt_extra_apps, [common_test]}]},
    {ct_opts, [{sys_config, ["./config/test.config"]}, {logdir, "./logs"}, {verbose, true}]},
    {cover_enabled, true},
    {cover_opts, [verbose]}]}]}.

{alias, [{test, [compile, format, hank, xref, dialyzer, ct, cover, ex_doc]}]}.

{shell, [{config, "config/test.config"}]}.

%% == Dependencies and plugins ==

{deps, [{zipper, "1.0.1"}, {katana_code, "~> 2.1.0"}]}.

{project_plugins,
 [{rebar3_hank, "~> 1.4.0"},
  {rebar3_hex, "~> 7.0.7"},
  {rebar3_format, "~> 1.3.0"},
  {rebar3_ex_doc, "0.2.18"}]}.

%% == Documentation ==

{ex_doc,
 [{source_url, <<"https://github.com/inaka/elvis_core">>},
  {extras, [<<"README.md">>, <<"LICENSE">>]},
  {main, <<"readme">>}]}.

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

%% == Format ==

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

%% == Hank ==

{hank, [{ignore, ["test/*/**"]}]}.

%% == Dialyzer + XRef ==

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

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

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