fix(elvis): nesting_level shouldn't exceed 6

This commit is contained in:
EMQ-YangM 2022-03-14 10:38:03 +08:00
parent b33b3f6eee
commit 740b3870bf
2 changed files with 5 additions and 2 deletions

View File

@ -233,7 +233,9 @@ source(get, #{bindings := #{type := Type}}) ->
case lookup_from_all_nodes(ResourceId) of
{ok, StatusAndMetrics} ->
Fun = fun ({Key, Val}, Map) -> maps:put(Key, Val, Map) end,
{200, lists:foldl(Fun, read_certs(Source), maps:to_list(StatusAndMetrics))};
{200, lists:foldl(Fun,
read_certs(Source),
maps:to_list(StatusAndMetrics))};
{error, ErrorMsg} -> {500, ErrorMsg}
end;
_ -> {200, read_certs(Source)}

View File

@ -30,7 +30,8 @@
{elvis_text_style, line_length, #{ limit => 100
, skip_comments => false
}},
{elvis_style, dont_repeat_yourself, #{ min_complexity => 100 }}
{elvis_style, dont_repeat_yourself, #{ min_complexity => 100 }},
{elvis_style, nesting_level, #{ level => 6 }}
]
},
#{dirs => ["."],