-
Notifications
You must be signed in to change notification settings - Fork 20
/
elvis.config
35 lines (35 loc) · 1.53 KB
/
elvis.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
[{elvis,
[{config,
[#{dirs => ["src"],
filter => "*.erl",
ruleset => erl_files,
rules =>
[{elvis_style, nesting_level, #{level => 4}},
{elvis_style, god_modules, #{limit => 35}},
{elvis_style, dont_repeat_yourself, #{min_complexity => 30}},
%% @todo Remove when this is fixed: https://github.com/inaka/elvis_core/issues/170
{elvis_style, atom_naming_convention, disable}]},
#{dirs => ["test"],
filter => "*.erl",
ruleset => erl_files,
rules =>
[{elvis_style, nesting_level, #{level => 4}},
%% Variables in eunit macros are called, for instance, __V
{elvis_style, variable_naming_convention, #{regex => "^_?_?([A-Z][0-9a-zA-Z]*)_?$"}},
%% we want to be able to ct:pal in tests
{elvis_style, no_debug_call, disable},
%% we can go lighter on this one here
{elvis_style, dont_repeat_yourself, #{min_complexity => 50}},
%% test modules tend to be bigger
{elvis_style, god_modules, #{limit => 50}},
%% @todo Remove when this is fixed: https://github.com/inaka/elvis_core/issues/170
{elvis_style, atom_naming_convention, disable}]},
#{dirs => ["."],
filter => "*rebar.config",
ruleset => rebar_config,
rules =>
%% Elixir deps use git@...
[{elvis_project, protocol_for_deps_rebar, disable}]},
#{dirs => ["."],
filter => "elvis.config",
ruleset => elvis_config}]}]}].