{erl_opts, [debug_info, nowarn_export_all]}.

{deps, [telemetry]}.
{shell, [{apps, [ecron]}]}.

{profiles, [{test, [{deps, [proper]}]}]}.
{project_plugins, [
    rebar3_proper, covertool, {rebar3_edoc_extensions, "1.5.0"}, rebar3_format, erlfmt
]}.

{cover_enabled, true}.
{cover_opts, [verbose]}.
{cover_print_enabled, true}.
{cover_export_enabled, true}.
{covertool, [{coverdata_files, ["eunit.coverdata", "proper.coverdata", "ct.coverdata"]}]}.

{xref_warnings, true}.
{xref_extra_paths, []}.
{xref_checks, [
    undefined_function_calls,
    undefined_functions,
    locals_not_used,
    deprecated_function_calls,
    deprecated_functions
]}.

{edoc_opts, [
    {stylesheet, "stylesheet.css"},
    {preprocess, true},
    {includes, ["."]},
    {sort_functions, false},
    {doclet, edoc_doclet_chunks},
    {layout, edoc_layout_chunks}
]}.

{alias, [
    {check, [
        xref,
        {eunit, "-c"},
        {proper, "-c"},
        {cover, "-v --min_coverage=75"},
        %% FIXME: Dialyzer is only executed on the library by
        %% default, not its testsuite. To run Dialyzer on the
        %% test suites as well, the following command must be used:
        %% rebar as test dialyzer
        dialyzer,
        edoc
    ]}
]}.

{format, [
    {files, ["src/*.erl", "include/*.hrl"]},
    %% The erlfmt formatter interface.
    {formatter, erlfmt_formatter},
    %% ...or no options at all.
    {options, #{print_width => 120, ignore_pragma => true}}
]}.
