%% -*- mode: erlang -*-
{erl_opts, [debug_info,
            warn_unused_vars,
            warnings_as_errors,
            warn_export_all,
            warn_shadow_vars,
            warn_unused_import,
            warn_unused_function,
            warn_bif_clash,
            warn_unused_record,
            warn_deprecated_function,
            warn_obsolete_guard,
            strict_validation,
            warn_export_vars,
            warn_exported_vars,
            %% warn_missing_spec,
            %% warn_untyped_record,
            {platform_define, "^(2|3)", recent_otp}]}.

{deps, [{quantile_estimator, "~> 0.2.1"}]}.
{shell, [{apps, [prometheus]}]}.
{cover_enabled, true}.
{cover_export_enabled, true}.
{cover_excl_mods, [prometheus_model, %% auto-generated from model.proto
                   prometheus_format, %% only callbacks
                   prometheus %% boilerplate application stuff
                  ]}.

{coveralls_coverdata, "_build/test/cover/eunit.coverdata"}.
{coveralls_service_name, "github"}.
{coveralls_parallel, true}.

{xref_extra_paths, []}.
{xref_ignores, [prometheus_model]}.
{xref_checks, [undefined_function_calls,undefined_functions,locals_not_used,
               deprecated_function_calls,deprecated_functions]}.

{profiles, [{docs, [{deps, [{edown, "0.8.4"}]},
                    {edoc_opts,
                     [{doclet, edown_doclet},
                      {dir, "doc"},
                      {subpackages, true},
                      {overview, "doc/overview.md"},
                      {top_level_readme,
                       {"./README.md",
                        "https://github.com/deadtrickster/prometheus.erl"}}]}]},
            {test, [
                    {eunit_compile_opts, [{src_dirs, ["src", "test/eunit"]}]},
                    {plugins, [{coveralls, {git, "https://github.com/RoadRunnr/coveralls-erl.git", {branch, "feature/git-info"}}}]}]},
            {gpb, [{plugins, [{rebar3_gpb_plugin, "2.7.0"}]},
                   {provider_hooks, [{pre,  [{compile, {protobuf, compile}}]},
                                     {post, [{clean,   {protobuf, clean}}]}]},
                   {gpb_opts, [{i, "src/model"},
                               {o_erl, "src/model"},
                               {o_hrl, "include"},
                               defs_as_proplists, strings_as_binaries, type_specs]}]},
            {benchmark, [{src_dirs, ["src", "benchmark"]},
                         {deps, [{'erlang-color',
                                  {git, "https://github.com/julianduque/erlang-color", {branch, "master"}}}]}]}]}.

