-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathelvis.config
More file actions
40 lines (40 loc) · 1.82 KB
/
elvis.config
File metadata and controls
40 lines (40 loc) · 1.82 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
[
{elvis, [
{verbose, true},
{config, [
#{
dirs => ["src"],
filter => "*.erl",
ruleset => erl_files,
rules => [
{elvis_text_style, line_length, #{limit => 120, skip_comments => false}},
%% Increase DRY threshold to allow small justified duplications (e.g., error formatting)
{elvis_style, dont_repeat_yourself, #{min_complexity => 20}},
%% Disable invalid_dynamic_call - we use gen_http_transport behavior pattern
{elvis_style, invalid_dynamic_call, disable},
%% Disable no_throw for parser modules that use throw for error handling
{elvis_style, no_throw, disable},
%% Allow single-clause case for guard-heavy code
{elvis_style, no_single_clause_case, disable},
%% Allow deeper nesting for complex fallback logic in parser modules
{elvis_style, nesting_level, #{level => 5}},
%% Allow records in specs for parser modules - records are the domain model
{elvis_style, no_spec_with_records, disable},
%% Disable private_data_types - conn/request_state/context types must be exported
%% for unified API but cannot be opaque (need pattern matching on record names)
{elvis_style, private_data_types, disable}
]
},
#{
dirs => ["."],
filter => "elvis.config",
ruleset => elvis_config
},
#{
dirs => ["."],
filter => "rebar.config",
ruleset => rebar_config
}
]}
]}
].