{minimum_otp_vsn, "24"}.

{erl_opts, [
    debug_info,
    warnings_as_errors,
    warn_missing_spec
]}.

{dialyzer, [
    {plt_apps, all_deps},
    {plt_extra_apps, [
        common_test,
        eunit
    ]},
    {warnings, [
        unknown,
        unmatched_returns
    ]}
]}.

{deps, []}.

{project_plugins, [
    {rebar3_hex, "7.0.8"},
    {erlfmt, "1.5.0"},
    {rebar3_lint, "3.2.6"},
    {rebar3_hank, "1.4.1"},
    {rebar3_ex_doc, "0.2.23"}
]}.

{erlfmt, [
    write,
    {print_width, 98},
    {files, [
        "elvis.config",
        "rebar.config",
        "benchmark/**/*.erl",
        "src/*.app.src",
        "src/**/*.erl",
        "test/**/*.erl"
    ]},
    {exclude_files, []}
]}.

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

{ex_doc, [
    {extras, [
        {'README.md', #{title => <<"Overview">>}},
        {'LICENSE.md', #{title => <<"License">>}},
        {'CHANGELOG.md', #{title => <<"Changelog">>}},
        {'CODE_OF_CONDUCT.md', #{title => <<"Code of Conduct">>}},
        {'CONTRIBUTING.md', #{title => <<"Contributing">>}},
        {'SECURITY.md', #{title => <<"Security">>}}
    ]},
    {main, <<"README.md">>},
    {homepage_url, <<"https://github.com/williamthome/euneus">>},
    {source_url, <<"https://github.com/williamthome/euneus">>},
    {api_reference, false},
    {prefix_ref_vsn_with_v, false}
]}.

{profiles, [
    {default, [
        {xref_checks, [
            exports_not_used
        ]},
        {erl_opts, [
            debug_info,
            nowarn_missing_spec,
            warnings_as_errors
        ]}
    ]},
    {test, [
        {dialyzer, [
            {plt_extra_apps, [
                common_test,
                eunit,
                doctest,
                jiffy,
                thoas
            ]}
        ]},
        {deps, [
            {json_polyfill, "0.1.4"},
            {doctest, "0.9.3"},
            {jiffy, "1.1.2"},
            {thoas, "1.2.1"}
        ]},
        {cover_enabled, true},
        {cover_opts, [verbose]},
        {erl_opts, [
            debug_info,
            nowarn_missing_spec,
            warnings_as_errors
        ]},
        {xref_checks, []}
    ]},
    {benchmark, [
        {deps, [
            {erlperf, "2.3.0"},
            {jiffy, "1.1.2"},
            {thoas, "1.2.1"}
        ]},
        {extra_src_dirs, [
            {"benchmark", [{recursive, true}]}
        ]}
    ]}
]}.

{alias, [
    {ci, [
        {fmt, "--check"},
        lint,
        hank,
        xref,
        {do, "default as test dialyzer"},
        eunit,
        ct,
        {cover, "--min_coverage 100"},
        ex_doc
    ]},
    {polyfill_ci, [
        lint,
        hank,
        xref,
        eunit,
        ct
    ]}
]}.

{eunit_opts, [no_tty, {report, {doctest_eunit_report, []}}]}.
