{minimum_otp_vsn, "29.0"}.

{erl_opts, [{i, "src"},
            warnings_as_errors,
            warn_export_all,
            warn_unused_import]}.

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

{dialyzer, [{warnings, [extra_return,
                        missing_return,
                        no_unknown,
                        unmatched_returns,
                        error_handling
                        %% overspecs,
                        %% underspecs,
                        %% specdiffs
                       ]},
            incremental,
            {plt_apps, top_level_deps},
            %% {plt_apps, all_apps},
            {plt_location, local},
            {base_plt_location, global}]}.
%%            {plt_extra_apps, [cowboy, jsone, hackney, jesse]}]}.

{cover_enabled, true}.

{validate_app_modules, true}.

{project_plugins, [rebar3_efmt, rebar3_lint]}.
{elvis_output_format, colors}.

{plugins, [rebar3_hex]}.

{deps,
 [{cowboy, "2.16.0"},
  {gun, "2.4.0"},
  {jsone, "2025.1.0", {pkg, shiguredo_jsone}},
  {jesse, "2025.1.0", {pkg, shiguredo_jesse}}]}.

%% https://github.com/erlang/rebar3/issues/2364#issuecomment-695819058
%% https://github.com/erlang/rebar3/issues/2364#issuecomment-2671015897
%% https://github.com/ninenines/cowboy/issues/1670
{overrides,
 [{override, cowboy,
             [{deps, [ranch, {cowlib, "2.17.0"}]}]},
  {override, gun,
             [{deps, [{cowlib, "2.17.0"}]}]}]}.

{profiles,
 [{test,
   [{plugins, [rebar3_proper]},
    {deps, [{proper,
             {git, "https://github.com/proper-testing/proper", {branch, "master"}}}]}]}]}.
