Skip to content

Commit 6c0e243

Browse files
committed
Fix elvis linter
1 parent f80e04e commit 6c0e243

3 files changed

Lines changed: 6 additions & 39 deletions

File tree

elvis.config

Lines changed: 0 additions & 33 deletions
This file was deleted.

rebar.config

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
{project_plugins, [
4444
{rebar3_hex, "~> 7.0"},
4545
{rebar3_ex_doc, "~> 0.2"},
46-
{rebar3_lint, "~> 4.1"},
46+
{rebar3_lint, "~> 4.2"},
4747
{rebar3_codecov, "~> 0.7"}
4848
]}.
4949

@@ -76,7 +76,8 @@
7676
rules => [
7777
{elvis_text_style, line_length, #{skip_comments => whole_line}},
7878
{elvis_style, export_used_types, disable},
79-
{elvis_style, invalid_dynamic_call, #{ignore => [{amoc_code_server, get_md5}]}},
79+
{elvis_style, private_data_types, disable},
80+
{elvis_style, no_invalid_dynamic_calls, #{ignore => [{amoc_code_server, get_md5}]}},
8081
{elvis_style, no_block_expressions, #{ignore => [amoc_cluster]}},
8182
{elvis_style, no_throw, #{ignore => [amoc_config]}}
8283
]

src/coordinator/amoc_coordinator.erl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,15 +170,14 @@ normalize_coordination_item({{Min, Max}, Actions}) when ?IS_POS_INT(Min), ?IS_PO
170170
[assert_action({Min, Max}, A) || A <- Actions],
171171
{{Min, Max}, Actions}.
172172

173-
assert_action(all, Action) when is_function(Action, 1);
174-
is_function(Action, 2) ->
173+
assert_action(all, Action) when is_function(Action, 1) orelse is_function(Action, 2) ->
175174
ok;
176-
assert_action(N, Action) when is_integer(N),
175+
assert_action(N, Action) when is_integer(N) andalso
177176
(is_function(Action, 1) orelse
178177
is_function(Action, 2) orelse
179178
is_function(Action, 3)) ->
180179
ok;
181-
assert_action({Min, Max}, Action) when is_integer(Min), is_integer(Max),
180+
assert_action({Min, Max}, Action) when is_integer(Min) andalso is_integer(Max) andalso
182181
(is_function(Action, 1) orelse
183182
is_function(Action, 2) orelse
184183
is_function(Action, 3)) ->

0 commit comments

Comments
 (0)