Skip to content

Commit 07063ba

Browse files
Upgrade elvis_core to 4.2.0 (#597)
1 parent 5c84f08 commit 07063ba

19 files changed

Lines changed: 341 additions & 943 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\
4343
-hash-${{hashFiles('rebar.lock')}}"
4444
- name: Format check
45-
run: rebar3 format --verify
45+
run: rebar3 fmt --check --verbose
4646
- shell: bash
4747
run: rebar3 test
4848
- shell: bash

config/elvis-test-pa.config

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[
2-
{
3-
elvis,
4-
[
5-
{config,
6-
[#{dirs => ["../../test/examples"],
7-
filter => "user_defined_rules.erl",
8-
rules => [{user_defined_rules, rule}]
9-
}
10-
]
2+
{
3+
elvis,
4+
[
5+
{config, [
6+
#{
7+
dirs => ["../../test/examples"],
8+
filter => "user_defined_rules.erl",
9+
rules => [{user_defined_rules, rule}]
10+
}
11+
]}
12+
]
1113
}
12-
]
13-
}
1414
].

config/elvis-test.config

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
[
2-
{
3-
elvis,
4-
[
5-
{config,
6-
[#{dirs => ["../../src"],
7-
filter => "*.erl",
8-
ruleset => erl_files
9-
},
10-
#{dirs => ["../.."],
11-
filter => "Makefile",
12-
ruleset => makefiles
13-
},
14-
#{dirs => ["../.."],
15-
filter => "rebar.config",
16-
ruleset => rebar_config
17-
},
18-
#{dirs => ["../.."],
19-
filter => "elvis.config",
20-
ruleset => elvis_config
21-
}
22-
]
2+
{
3+
elvis,
4+
[
5+
{config, [
6+
#{
7+
dirs => ["../../src"],
8+
filter => "*.erl",
9+
ruleset => erl_files
10+
},
11+
#{
12+
dirs => ["../.."],
13+
filter => "rebar.config",
14+
ruleset => rebar_config
15+
}
16+
]}
17+
]
2318
}
24-
]
25-
}
2619
].

config/elvis.config

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
[
2-
{
3-
elvis,
4-
[
5-
{config,
6-
[#{dirs => ["src"],
7-
filter => "*.erl",
8-
ruleset => erl_files
9-
},
10-
#{dirs => ["."],
11-
filter => "Makefile",
12-
ruleset => makefiles
13-
},
14-
#{dirs => ["."],
15-
filter => "rebar.config",
16-
ruleset => rebar_config
17-
},
18-
#{dirs => ["."],
19-
filter => "elvis.config",
20-
ruleset => elvis_config
21-
}
22-
]
2+
{
3+
elvis,
4+
[
5+
{config, [
6+
#{
7+
dirs => ["src"],
8+
filter => "*.erl",
9+
ruleset => erl_files
10+
}
11+
]}
12+
]
2313
}
24-
]
25-
}
2614
].
Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,49 @@
11
[
2-
{
3-
elvis,
4-
[
5-
{config,
6-
[#{dirs => ["../../test/examples"],
7-
filter => "*.erl",
8-
rules => [{elvis_style, line_length, [80]},
9-
{elvis_style, no_tabs, []},
10-
{elvis_style, macro_names, []},
11-
{elvis_style, operator_spaces, [{right, ","},
12-
{right, "++"},
13-
{left, "++"}]},
14-
{elvis_style, nesting_level, [3]},
15-
{elvis_style, god_modules, [25]},
16-
{elvis_style, no_if_expression, []},
17-
{elvis_style, invalid_dynamic_call, [elvis]},
18-
{elvis_style, used_ignored_variable, []},
19-
{elvis_style, no_behavior_info, []},
20-
{
21-
elvis_style,
22-
module_naming_convention,
23-
["^([a-z][a-z0-9]*_?)*(_SUITE)?$", []]
24-
},
25-
{elvis_style, state_record_and_type, []},
26-
{elvis_style, no_spec_with_records, []}
27-
]
28-
},
29-
#{dirs => ["."],
30-
filter => "Makefile",
31-
rules => [{elvis_project, no_deps_master_erlang_mk, []},
32-
{elvis_project, protocol_for_deps_erlang_mk, []}]
33-
},
34-
#{dirs => ["."],
35-
filter => "rebar.config",
36-
rules => [{elvis_project, no_deps_master_rebar, []},
37-
{elvis_project, protocol_for_deps_rebar, []}]
38-
},
39-
#{dirs => ["."],
40-
filter => "elvis.config",
41-
rules => [{elvis_project, old_configuration_format, []}]
42-
}
43-
]
2+
{
3+
elvis,
4+
[
5+
{config, [
6+
#{
7+
dirs => ["../../test/examples"],
8+
filter => "*.erl",
9+
rules => [
10+
{elvis_style, line_length, [80]},
11+
{elvis_style, no_tabs, []},
12+
{elvis_style, macro_names, []},
13+
{elvis_style, operator_spaces, [
14+
{right, ","},
15+
{right, "++"},
16+
{left, "++"}
17+
]},
18+
{elvis_style, nesting_level, [3]},
19+
{elvis_style, god_modules, [25]},
20+
{elvis_style, no_if_expression, []},
21+
{elvis_style, invalid_dynamic_call, [elvis]},
22+
{elvis_style, used_ignored_variable, []},
23+
{elvis_style, no_behavior_info, []},
24+
{
25+
elvis_style,
26+
module_naming_convention,
27+
["^([a-z][a-z0-9]*_?)*(_SUITE)?$", []]
28+
},
29+
{elvis_style, state_record_and_type, []},
30+
{elvis_style, no_spec_with_records, []}
31+
]
32+
},
33+
#{
34+
dirs => ["."],
35+
filter => "rebar.config",
36+
rules => [
37+
{elvis_project, no_deps_master_rebar, []},
38+
{elvis_project, protocol_for_deps_rebar, []}
39+
]
40+
},
41+
#{
42+
dirs => ["."],
43+
filter => "elvis.config",
44+
rules => [{elvis_project, old_configuration_format, []}]
45+
}
46+
]}
47+
]
4448
}
45-
]
46-
}
4749
].

config/old/elvis-test.config

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
[
2-
{
3-
elvis,
4-
[
5-
{config,
6-
#{src_dirs => ["../../src"],
7-
rules => [{elvis_style, line_length, [80]},
8-
{elvis_style, no_tabs, []},
9-
{elvis_style, macro_names, []},
10-
{elvis_style, operator_spaces, [{right, ","},
11-
{right, "++"},
12-
{left, "++"}]},
13-
{elvis_style, nesting_level, [3]},
14-
{elvis_style, god_modules, [25]},
15-
{elvis_style, no_if_expression, []},
16-
{elvis_style, invalid_dynamic_call, [elvis]},
17-
{elvis_style, used_ignored_variable, []},
18-
{elvis_style, no_behavior_info, []},
19-
{
20-
elvis_style,
21-
module_naming_convention,
22-
["^([a-z][a-z0-9]*_?)*(_SUITE)?$", []]
23-
},
24-
{elvis_style, state_record_and_type, []},
25-
{elvis_style, no_spec_with_records, []}
2+
{
3+
elvis,
4+
[
5+
{config, #{
6+
src_dirs => ["../../src"],
7+
rules => [
8+
{elvis_style, line_length, [80]},
9+
{elvis_style, no_tabs, []},
10+
{elvis_style, macro_names, []},
11+
{elvis_style, operator_spaces, [
12+
{right, ","},
13+
{right, "++"},
14+
{left, "++"}
15+
]},
16+
{elvis_style, nesting_level, [3]},
17+
{elvis_style, god_modules, [25]},
18+
{elvis_style, no_if_expression, []},
19+
{elvis_style, invalid_dynamic_call, [elvis]},
20+
{elvis_style, used_ignored_variable, []},
21+
{elvis_style, no_behavior_info, []},
22+
{
23+
elvis_style,
24+
module_naming_convention,
25+
["^([a-z][a-z0-9]*_?)*(_SUITE)?$", []]
26+
},
27+
{elvis_style, state_record_and_type, []},
28+
{elvis_style, no_spec_with_records, []}
2629
]
27-
}
30+
}}
31+
]
2832
}
29-
]
30-
}
3133
].

config/old/elvis.config

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
[
2-
{
3-
elvis,
4-
[
5-
{config,
6-
#{src_dirs => ["src"],
7-
rules => [{elvis_style, line_length, [80]},
8-
{elvis_style, no_tabs, []},
9-
{elvis_style, macro_names, []},
10-
{elvis_style, operator_spaces, [{right, ","},
11-
{right, "++"},
12-
{left, "++"}]},
13-
{elvis_style, nesting_level, [3]},
14-
{elvis_style, god_modules, [25]},
15-
{elvis_style, no_if_expression, []},
16-
{elvis_style, invalid_dynamic_call, [elvis]},
17-
{elvis_style, used_ignored_variable, []},
18-
{elvis_style, no_behavior_info, []},
19-
{
20-
elvis_style,
21-
module_naming_convention,
22-
["^([a-z][a-z0-9]*_?)*(_SUITE)?$", []]
23-
},
24-
{elvis_style, state_record_and_type, []},
25-
{elvis_style, no_spec_with_records, []}
26-
]
27-
}
2+
{
3+
elvis,
4+
[
5+
{config, #{
6+
src_dirs => ["src"],
7+
rules => [
8+
{elvis_style, line_length, [80]},
9+
{elvis_style, no_tabs, []},
10+
{elvis_style, macro_names, []},
11+
{elvis_style, operator_spaces, [
12+
{right, ","},
13+
{right, "++"},
14+
{left, "++"}
15+
]},
16+
{elvis_style, nesting_level, [3]},
17+
{elvis_style, god_modules, [25]},
18+
{elvis_style, no_if_expression, []},
19+
{elvis_style, invalid_dynamic_call, [elvis]},
20+
{elvis_style, used_ignored_variable, []},
21+
{elvis_style, no_behavior_info, []},
22+
{
23+
elvis_style,
24+
module_naming_convention,
25+
["^([a-z][a-z0-9]*_?)*(_SUITE)?$", []]
26+
},
27+
{elvis_style, state_record_and_type, []},
28+
{elvis_style, no_spec_with_records, []}
29+
]
30+
}}
31+
]
2832
}
29-
]
30-
}
3133
].

config/test.config

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
11
[
2-
{
3-
elvis,
4-
[
5-
{config,
6-
[#{dirs => ["../../test/examples"],
7-
filter => "**.erl",
8-
ruleset => erl_files
9-
},
10-
#{dirs => ["."],
11-
filter => "Makefile",
12-
ruleset => makefiles
13-
},
14-
#{dirs => ["."],
15-
filter => "rebar.config",
16-
ruleset => rebar_config
17-
},
18-
#{dirs => ["."],
19-
filter => "elvis.config",
20-
ruleset => elvis_config
21-
}
22-
]
23-
},
24-
{output_format, plain},
25-
%% Basic Auth
26-
{github_user, ""},
27-
{github_password, ""}
28-
]
29-
}
2+
{
3+
elvis,
4+
[
5+
{config, [
6+
#{
7+
dirs => ["../../test/examples"],
8+
filter => "**.erl",
9+
ruleset => erl_files
10+
}
11+
]},
12+
{output_format, plain}
13+
]
14+
}
3015
].

0 commit comments

Comments
 (0)