Repository navigation
Expand file tree
/
Copy pathelvis.config
More file actions
71 lines (71 loc) · 3.21 KB
/
Copy pathelvis.config
File metadata and controls
71 lines (71 loc) · 3.21 KB
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
[
{config, [
#{
files => ["src/**/*.erl"],
ruleset => erl_files_strict,
rules => [
{elvis_style, atom_naming_convention, #{
regex => "^[a-z][a-z_@0-9]*(_SUITE)?$|^syntaxTree$"
}},
{elvis_style, function_naming_convention, #{
regex => "^[a-z][a-z_0-9]*$"
}},
{elvis_style, no_macros, disable},
{elvis_style, max_function_length, disable},
{elvis_style, max_function_clause_length, disable},
{elvis_style, no_throw, disable},
{elvis_style, prefer_strict_generators, disable},
{elvis_style, no_invalid_dynamic_calls, disable},
{elvis_style, max_module_length, disable},
%% Raised from the default 25 for arizona_json and arizona_live
%% (renderer callbacks, the live process API); a facade past 40
%% (arizona_js, arizona_req, ...) opts out with its own -elvis.
{elvis_style, no_god_modules, #{limit => 40}},
{elvis_style, prefer_sigils, disable}
]
},
#{
files => ["test/**/*.erl"],
ruleset => erl_files_strict,
rules => [
{elvis_style, dont_repeat_yourself, disable},
{elvis_style, atom_naming_convention, #{
regex => "^[a-z][a-z_@0-9]*(_SUITE)?$"
}},
{elvis_style, function_naming_convention, #{
regex => "^[a-z][a-z_0-9]*(_SUITE)?$"
}},
{elvis_style, no_macros, disable},
{elvis_style, max_function_length, disable},
{elvis_style, max_function_clause_length, disable},
{elvis_style, no_throw, disable},
{elvis_style, prefer_strict_generators, disable},
{elvis_style, no_invalid_dynamic_calls, disable},
{elvis_style, max_module_length, disable},
{elvis_style, no_deep_nesting, disable},
{elvis_style, state_record_and_type, disable},
{elvis_style, private_data_types, disable},
{elvis_style, no_boolean_in_comparison, disable},
{elvis_style, no_common_caveats_call, disable},
{elvis_style, no_block_expressions, disable},
%% Support modules exercise content-slot `if` (a documented walked
%% form) even though src style prefers `case`.
{elvis_style, no_if_expression, disable},
{elvis_style, export_used_types, disable},
{elvis_style, no_init_lists, disable},
{elvis_style, prefer_sigils, disable},
{elvis_style, abc_size, disable},
{elvis_style, prefer_robot_butt, disable},
{elvis_style, no_god_modules, disable}
]
},
#{
files => ["rebar.config"],
ruleset => rebar_config,
rules => [
% Fixes "dependency 'eqwalizer_support' uses a branch"
{elvis_project, no_branch_deps, disable}
]
}
]}
].