-
Notifications
You must be signed in to change notification settings - Fork 117
/
elvis.config
83 lines (83 loc) · 2.63 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
%% -*- mode: erlang -*-
[
{
elvis,
[
{config,
[#{dirs => [
"src",
"src/collectors",
"src/collectors/vm",
"src/contrib",
"src/formats",
"src/metrics"
],
filter => "*.erl",
rules => [
{elvis_text_style, line_length,
#{limit => 120, skip_comments => false}},
{elvis_style, invalid_dynamic_call,
#{ignore => [
prometheus_misc,
prometheus_registry,
prometheus_sup,
prometheus_instrumenter
]}},
{elvis_style, god_modules, #{limit => 54}},
{elvis_style, dont_repeat_yourself, #{min_complexity => 50}}
],
ruleset => erl_files
},
#{dirs => [
"src/model"
],
filter => "prometheus_model_helpers.erl",
rules => [
{elvis_text_style, line_length,
#{limit => 120}},
{elvis_style, invalid_dynamic_call,
#{ignore => [
%% FIXME: why create_mf calls collect_metrics??
prometheus_model_helpers
]}},
{elvis_style, god_modules, #{limit => 40}}
],
ruleset => erl_files
},
#{dirs => [
"test/eunit",
"test/eunit/format",
"test/eunit/contrib",
"test/eunit/metric"
],
filter => "*.erl",
rules => [
{elvis_text_style, line_length,
#{limit => 120}},
{elvis_style, invalid_dynamic_call,
#{ignore => [
]}},
{elvis_style, god_modules, #{limit => 40}},
%% looks like eunit generates underscored vars
{elvis_style, variable_naming_convention, #{regex => "^([A-Z_][0-9a-zA-Z_]*)$"}},
{elvis_style, dont_repeat_yourself, #{min_complexity => 200}}
],
ruleset => erl_files
},
#{dirs => ["."],
filter => "Makefile",
ruleset => makefiles
},
#{dirs => ["."],
filter => "rebar.config",
ruleset => rebar_config
},
#{dirs => ["."],
filter => "elvis.config",
ruleset => elvis_config
}
]
}
]
}
].