Repository navigation
Expand file tree
/
Copy pathelvis.config
More file actions
142 lines (140 loc) · 5.7 KB
/
Copy pathelvis.config
File metadata and controls
142 lines (140 loc) · 5.7 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
[
{config, [
#{
files => ["src/**/*.erl"],
rules => [
%% Same global settings as erlang_quic
{elvis_style, no_macros, disable},
{elvis_style, prefer_strict_generators, disable},
{elvis_style, prefer_sigils, disable},
{elvis_style, consistent_ok_error_spec, disable},
{elvis_style, abc_size, disable},
{elvis_style, code_complexity, disable},
{elvis_style, consistent_variable_naming, disable},
{elvis_style, no_common_caveats_call, disable},
{elvis_style, no_init_lists, disable},
{elvis_style, no_spec_with_records, disable},
{elvis_style, param_pattern_matching, disable},
{elvis_style, no_used_ignored_variables, disable},
{elvis_text_style, max_line_length, #{limit => 120}},
%% Exemptions for the modules that existed when the rules were
%% adopted. A new module follows every rule; shrink these lists
%% when a module is reworked, never grow them to pass a change.
%% Processes that wait for a reply or a stop with no deadline
{elvis_style, no_receive_without_timeout, #{
ignore => [
py_byte_channel,
py_channel,
py_context,
py_context_embedded,
py_reactor_context,
py_reimport_session,
py_session,
py_thread_handler
]
}},
{elvis_style, state_record_and_type, #{
ignore => [
py_callback,
py_event_loop,
py_event_loop_pool,
py_event_worker,
py_event_worker_registry,
py_isolated,
py_logger,
py_reimport_session,
py_session_template,
py_shm,
py_thread_handler,
py_tracer
]
}},
%% ?NIF_STUB is an expression used by every stub
{elvis_style, macro_definition_parentheses, #{ignore => [py_nif]}},
%% Early exits while a pool starts its contexts
{elvis_style, no_throw, #{ignore => [py_context_router]}},
{elvis_style, no_if_expression, #{
ignore => [py_isolated, py_semaphore, py_stream]
}},
{elvis_style, no_block_expressions, #{
ignore => [py, py_session_template, py_shm]
}},
{elvis_style, guard_operators, #{
ignore => [py_child, py_context_embedded, py_util]
}},
{elvis_style, no_boolean_in_comparison, #{ignore => [py_shm]}},
{elvis_style, no_deep_nesting, #{
ignore => [py_context_embedded, py_event_loop_pool]
}},
{elvis_style, dont_repeat_yourself, #{
ignore => [
py_byte_channel,
py_channel,
py_context,
py_context_embedded,
py_event_loop,
py_event_loop_pool,
py_isolated,
py_reimport_session,
py_session,
py_session_template,
py_shm,
py_state,
py_thread_handler
]
}},
{elvis_style, max_function_length, #{
ignore => [
erlang_python_sup,
py,
py_context_embedded,
py_context_router,
py_event_loop_pool,
py_event_worker,
py_import,
py_isolated,
py_reactor_context,
py_reimport_session,
py_session_template,
py_shm,
py_stream,
py_thread_handler,
py_tracer
]
}},
{elvis_style, max_function_clause_length, #{
ignore => [
erlang_python_sup,
py,
py_context_embedded,
py_context_router,
py_event_loop_pool,
py_import,
py_isolated,
py_reactor_context,
py_session_template,
py_stream
]
}},
{elvis_style, max_module_length, #{
ignore => [
py,
py_context_embedded,
py_event_loop_pool,
py_isolated,
py_nif,
py_session_template
]
}},
{elvis_style, no_god_modules, #{
ignore => [py, py_context, py_event_loop_pool, py_nif, py_shm]
}}
],
ruleset => erl_files_strict
},
#{
files => ["rebar.config"],
ruleset => rebar_config
}
]}
].