%% -*- erlang -*-
{erl_opts, [
    warnings_as_errors,
    warn_export_all,
    warn_untyped_record,
    inline,
    debug_info,
    fail_on_warning,
    {parse_transform},
    {parse_transform, lager_transform}
]}.

{clean_files, [
    ".eunit/*", "ebin/*.beam"
]}.

{deps, [
    lager,
    jsone,
    edown
]}.

{shell, [{apps, [jsone]}]}.

{profiles,[
    {test, [
        {erl_opts, [nowarn_export_all]},
        {shell, [
            {apps, [jsone, ovsdb, erlsh, sync]},
            {vm_args, "config/vm.args"},
            {config,  "config/sys.config"}
        ]},
        {plugins, [covertool]},
        {deps, [
            {sync,  {git, "https://github.com/rustyio/sync.git", {branch, "master"}}},
            {erlsh,  {git, "https://github.com/proger/erlsh.git", {branch, "master"}}}
        ]}
    ]},
    {edown, [
        {edoc_opts,[
            {sort_functions, false},
            {doclet, edown_doclet}
        ]},
        {deps, [edown]}
    ]},
    {ct_profile, [
        {plugins, [covertool]}
    ]}
]}.

{shell, [
    {vm_args, "./config/vm.args"}
]}.

{relx, [
    {release, { ovsdb, "0.1.0" }, [
        cello
    ]},
    {sys_config, "./config/sys.config"},
    {vm_args, "./config/vm.args.k8s"},
    {dev_mode, false},
    {include_erts, false},
    {include_src, false},
    {extended_start_script, true}
]}.

{cover_enabled, true}.

{edoc_opts, [
    {dialyzer_specs, all},
    {report_missing_type, true},
    {report_type_mismatch, true},
    {pretty_print, erl_pp},
    {doclet, edown_doclet},
    {preprocess, true}
]}.
{validate_app_modules, true}.

{dialyzer, [
    {warnings, [
        error_handling, race_conditions, unmatched_returns, unknown, no_improper_lists
    ]}
]}.

{xref_checks, [
    fail_on_warning,
    undefined_function_calls
]}.

