Przeglądaj źródła

fix: elvis warning

Zhongwen Deng 3 lat temu
rodzic
commit
512a5c3b8e

+ 0 - 2
apps/emqx/test/emqx_trie_SUITE.erl

@@ -22,8 +22,6 @@
 -include_lib("emqx/include/emqx.hrl").
 -include_lib("eunit/include/eunit.hrl").
 
--define(TRIE, emqx_trie).
-
 all() ->
     [{group, compact},
      {group, not_compact}

+ 7 - 4
apps/emqx_modules/src/emqx_rewrite_api.erl

@@ -35,7 +35,7 @@ paths() ->
 
 schema("/mqtt/topic_rewrite") ->
     #{
-        operationId => topic_rewrite,
+        'operationId' => topic_rewrite,
         get => #{
             tags => ?API_TAG_MQTT,
             description => <<"List rewrite topic.">>,
@@ -47,11 +47,13 @@ schema("/mqtt/topic_rewrite") ->
         put => #{
             description => <<"Update rewrite topic">>,
             tags => ?API_TAG_MQTT,
-            requestBody => hoconsc:mk(hoconsc:array(hoconsc:ref(emqx_modules_schema, "rewrite")),#{}),
+            'requestBody' => hoconsc:mk(hoconsc:array(
+                hoconsc:ref(emqx_modules_schema, "rewrite")),#{}),
             responses => #{
                 200 => hoconsc:mk(hoconsc:array(hoconsc:ref(emqx_modules_schema, "rewrite")),
                     #{desc => <<"Update rewrite topic success.">>}),
-                413 => emqx_dashboard_swagger:error_codes([?EXCEED_LIMIT], <<"Rules count exceed max limit">>)
+                413 => emqx_dashboard_swagger:error_codes([?EXCEED_LIMIT],
+                    <<"Rules count exceed max limit">>)
             }
         }
     }.
@@ -65,6 +67,7 @@ topic_rewrite(put, #{body := Body}) ->
             ok = emqx_rewrite:update(Body),
             {200, emqx_rewrite:list()};
         _ ->
-            Message = iolist_to_binary(io_lib:format("Max rewrite rules count is ~p", [?MAX_RULES_LIMIT])),
+            Message = iolist_to_binary(
+                io_lib:format("Max rewrite rules count is ~p", [?MAX_RULES_LIMIT])),
             {413, #{code => ?EXCEED_LIMIT, message => Message}}
     end.