%% -*- mode: erlang -*-

{cover_enabled, true}.

{edoc_opts, [{preprocess, true}]}.

{profiles, [
    {test, [
        {deps, [
            {erlexec, "1.10.0"}
        ]}
    ]},
    {lint, [
        {plugins, [{rebar3_lint, "3.2.5"}]}
    ]}
]}.

{ct_opts, [
    {ct_hooks, [epgsql_cth]}
]}.

{elvis,
  [#{dirs => ["src", "src/*"],
     include_dirs => ["include"],
     filter => "*.erl",
     ruleset => erl_files,
     rules =>
         [{elvis_text_style, line_length, #{limit => 120}},
          {elvis_style, god_modules, #{ignore => [epgsql, epgsqla, epgsqli, epgsql_sock, epgsql_wire]}},
          {elvis_style, dont_repeat_yourself, #{min_complexity => 11}},
          {elvis_style, state_record_and_type, disable}, % epgsql_sock
          {elvis_style, export_used_types, disable},
          {elvis_style, no_space, disable},
          {elvis_style, atom_naming_convention, disable},
          {elvis_style, operator_spaces, disable},
          {elvis_style, private_data_types, disable},
          {elvis_style, param_pattern_matching, disable},
          {elvis_style, consistent_variable_casing, disable},
          {elvis_style, no_catch_expressions, disable},
          {elvis_style, behaviour_spelling, disable}
         ]}
  ]
 }.

{dialyzer,
 [
  {warnings, [unknown]},
  {plt_apps, all_deps}
 ]}.
