Просмотр исходного кода

fix(dialyzer): only include eunit when TEST is defined

Zaiming (Stone) Shi 2 лет назад
Родитель
Сommit
33a7282cdd

+ 1 - 1
apps/emqx_auth/src/emqx_auth.app.src

@@ -1,7 +1,7 @@
 %% -*- mode: erlang -*-
 {application, emqx_auth, [
     {description, "EMQX Authentication and authorization"},
-    {vsn, "0.1.28"},
+    {vsn, "0.1.29"},
     {modules, []},
     {registered, [emqx_auth_sup]},
     {applications, [

+ 2 - 0
apps/emqx_auth/src/emqx_authn/emqx_authn_schema.erl

@@ -21,7 +21,9 @@
 -include("emqx_authn.hrl").
 -include("emqx_authn_chains.hrl").
 
+-ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
+-endif.
 
 -behaviour(emqx_schema_hooks).
 -export([

+ 3 - 0
apps/emqx_bridge/src/schema/emqx_bridge_v2_schema.erl

@@ -18,7 +18,10 @@
 -include_lib("typerefl/include/types.hrl").
 -include_lib("hocon/include/hoconsc.hrl").
 -include_lib("emqx/include/logger.hrl").
+
+-ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
+-endif.
 
 -import(hoconsc, [mk/2, ref/2]).
 

+ 9 - 6
apps/emqx_connector/src/schema/emqx_connector_schema.erl

@@ -18,7 +18,10 @@
 -include_lib("typerefl/include/types.hrl").
 -include_lib("hocon/include/hoconsc.hrl").
 -include_lib("emqx/include/logger.hrl").
+
+-ifdef(TEST).
 -include_lib("eunit/include/eunit.hrl").
+-endif.
 
 -import(hoconsc, [mk/2, ref/2]).
 
@@ -557,6 +560,12 @@ to_bin(Bin) when is_binary(Bin) ->
 to_bin(Something) ->
     Something.
 
+node_name() ->
+    {"node", mk(binary(), #{desc => ?DESC("desc_node_name"), example => "emqx@127.0.0.1"})}.
+
+status() ->
+    hoconsc:enum([connected, disconnected, connecting, inconsistent]).
+
 -ifdef(TEST).
 -include_lib("hocon/include/hocon_types.hrl").
 schema_homogeneous_test() ->
@@ -591,12 +600,6 @@ is_bad_schema(#{type := ?MAP(_, ?R_REF(Module, TypeName))}) ->
             }}
     end.
 
-status() ->
-    hoconsc:enum([connected, disconnected, connecting, inconsistent]).
-
-node_name() ->
-    {"node", mk(binary(), #{desc => ?DESC("desc_node_name"), example => "emqx@127.0.0.1"})}.
-
 common_field_names() ->
     [
         enable, description