style(elvis): force spaces around | and ||
This commit is contained in:
parent
dc510fb572
commit
5b126d60ad
|
@ -23,7 +23,8 @@
|
|||
cli(["server", "list"]) ->
|
||||
if_enabled(fun() ->
|
||||
Services = emqx_exhook:list(),
|
||||
[emqx_ctl:print("HookServer(~s)~n", [emqx_exhook_server:format(Service)]) || Service <- Services]
|
||||
[emqx_ctl:print("HookServer(~s)~n",
|
||||
[emqx_exhook_server:format(Service)]) || Service <- Services]
|
||||
end);
|
||||
|
||||
cli(["server", "enable", Name0]) ->
|
||||
|
@ -74,7 +75,7 @@ hint() ->
|
|||
stats() ->
|
||||
lists:usort(lists:foldr(fun({K, N}, Acc) ->
|
||||
case atom_to_list(K) of
|
||||
"exhook." ++ Key -> [{Key, N}|Acc];
|
||||
"exhook." ++ Key -> [{Key, N} | Acc];
|
||||
_ -> Acc
|
||||
end
|
||||
end, [], emqx_metrics:all())).
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
[
|
||||
{config,
|
||||
[
|
||||
#{dirs => ["src", "apps/**/src", "lib-ce/**/src"],
|
||||
#{dirs => ["src", "apps/**/src", "lib-ce/**/src", "lib-ee/**/src"],
|
||||
filter => "*.erl",
|
||||
ruleset => erl_files,
|
||||
rules => [
|
||||
|
@ -13,7 +13,11 @@
|
|||
{elvis_style, no_common_caveats_call, #{}},
|
||||
{elvis_style, no_debug_call, #{ debug_functions => [ {ct, pal}
|
||||
, {ct, print}
|
||||
]}}
|
||||
]}},
|
||||
{elvis_style, operator_spaces, #{rules => [{right, "|"},
|
||||
{left, "|"},
|
||||
{right, "||"},
|
||||
{left, "||"}]}}
|
||||
]
|
||||
},
|
||||
#{dirs => ["test", "apps/**/test", "lib-ce/**/src"],
|
||||
|
|
Loading…
Reference in New Issue