% -*- mode: erlang; -*- vim: set ft=erlang:

%% == Erlang Compiler == %%

{minimum_otp_vsn, "21.0"}. % but only 22+ is supported

{erl_opts, [
    debug_info,
    warn_export_vars,
    warn_missing_spec,
    warn_unused_import,
    warnings_as_errors,
    {platform_define, "^22\\.", 'NO_CT_SUITE_BEHAVIOUR'},
    {platform_define, "^23\\.[0-1]", 'NO_CT_SUITE_BEHAVIOUR'}
]}.

%% == Dependencies and plugins ==

{deps, []}.

{project_plugins, [
    {rebar3_hex, "6.11.7"}
]}.

%% == Dialyzer ==

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

%% == Xref ==

{xref_checks, [
    deprecated_function_calls,
    exports_not_used,
    locals_not_used,
    undefined_function_calls
]}.

%% == Profiles ==

{profiles, [
    {test, [
        {erl_opts, [
            debug_info,
            nowarn_export_all,
            nowarn_missing_spec,
            nowarnings_as_errors
        ]},
        {shell, [
            {apps, [lager]},
            {config, "test/config/sys.config"}
        ]},
        {cover_enabled, true},
        {cover_opts, [verbose]}
    ]},

    {docs, [
        {edoc_opts, [
            {preprocess, true},
            {doclet, edoc_doclet_chunks},
            {layout, edoc_layout_chunks},
            {dir, "_build/default/lib/lager/doc"}
        ]}
    ]}
]}.
