%% Common project erlang options.
{erl_opts, [

    % mandatory
    debug_info,
    warn_export_all,
    warn_untyped_record,
    warn_export_vars,

    % by default
    warn_unused_record,
    warn_bif_clash,
    warn_obsolete_guard,
    warn_unused_vars,
    warn_shadow_vars,
    warn_unused_import,
    warn_unused_function,
    warn_deprecated_function
]}.

%% XRef checks
{xref_checks, [
    deprecated_functions_calls,
    deprecated_functions
]}.

%% Dialyzer static analyzing
{dialyzer, [
    {warnings, [
        % mandatory
        unmatched_returns,
        error_handling,
        unknown
        % hardcore mode
        % overspecs,
        % underspecs
    ]},
    {plt_extra_apps, [ssl, inets, public_key]}
]}.

{plugins, [
    {erlfmt, "1.1.0"}
]}.

{erlfmt, [
    {print_width, 100},
    {files, "{src,include,test}/*.{hrl,erl,app.src}"}
]}.

{profiles, [
    {test, [
        {deps, [{meck, "0.9.2"}]},
        {eunit_tests, [
            {dir, "test"},
            {dir, "test/gen-erl"}
        ]}
    ]}
]}.
