Sfoglia il codice sorgente

fix: please the elvis

Shawn 3 anni fa
parent
commit
14633eaac8
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5 1
      apps/emqx_rule_engine/src/emqx_rule_runtime.erl

+ 5 - 1
apps/emqx_rule_engine/src/emqx_rule_runtime.erl

@@ -42,6 +42,10 @@
 -type alias() :: atom().
 -type alias() :: atom().
 -type collection() :: {alias(), [term()]}.
 -type collection() :: {alias(), [term()]}.
 
 
+-elvis([
+    {elvis_style, invalid_dynamic_call, #{ignore => [emqx_rule_runtime]}}
+]).
+
 -define(ephemeral_alias(TYPE, NAME),
 -define(ephemeral_alias(TYPE, NAME),
     iolist_to_binary(io_lib:format("_v_~ts_~p_~p", [TYPE, NAME, erlang:system_time()]))
     iolist_to_binary(io_lib:format("_v_~ts_~p_~p", [TYPE, NAME, erlang:system_time()]))
 ).
 ).
@@ -271,7 +275,7 @@ match_conditions({'not', Var}, Data) ->
     case eval(Var, Data) of
     case eval(Var, Data) of
         Bool when is_boolean(Bool) ->
         Bool when is_boolean(Bool) ->
             not Bool;
             not Bool;
-        _other ->
+        _Other ->
             false
             false
     end;
     end;
 match_conditions({in, Var, {list, Vals}}, Data) ->
 match_conditions({in, Var, {list, Vals}}, Data) ->