%% vim:ft=erlang:
{minimum_otp_vsn, "23.0"}.

{deps, [{ra, "2.1.0"}]}.

{project_plugins, [rebar3_proper,
                   covertool,
                   rebar3_hex,
                   {rebar3_edoc_extensions, "1.5.0"}]}.

{erl_opts, [debug_info,
            warn_export_vars,
            warnings_as_errors]}.

{dialyzer, [{warnings, [underspecs,
                        unknown,
                        unmatched_returns]}]}.

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

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

{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
                  %% testsuites as well, the following command must be used:
                  %%   rebar as test dialyzer
                  dialyzer,
                  edoc]}]}.

{profiles,
 [{test,
   [{deps, [{proper, "1.4.0"},
            %% FIXME: We need to add `cth_readable' as a dependency and an
            %% extra app for Dialyzer. That's because Rebar is using that
            %% application to override `ct:pal()' and Dialyzer complains it
            %% doesn't know this application.
            cth_readable]},
    {dialyzer, [{plt_extra_apps, [common_test,
                                  cth_readable, %% <-- See comment above.
                                  edoc,
                                  eunit,
                                  inets,
                                  mnesia,
                                  proper,
                                  ssl,
                                  xmerl]}]}
   ]}]}.

{hex, [{doc, edoc}]}.
