refactor(schema): comma_separated_list is list(string()) not list(any())

This commit is contained in:
Zaiming (Stone) Shi 2023-11-12 11:32:36 +01:00
parent 06e440260f
commit 021f7e6b49
2 changed files with 1 additions and 4 deletions

View File

@ -48,7 +48,7 @@
-type wordsize() :: bytesize(). -type wordsize() :: bytesize().
-type percent() :: float(). -type percent() :: float().
-type file() :: string(). -type file() :: string().
-type comma_separated_list() :: list(). -type comma_separated_list() :: list(string()).
-type comma_separated_binary() :: [binary()]. -type comma_separated_binary() :: [binary()].
-type comma_separated_atoms() :: [atom()]. -type comma_separated_atoms() :: [atom()].
-type ip_port() :: tuple() | integer(). -type ip_port() :: tuple() | integer().

View File

@ -32,19 +32,16 @@
-type duration() :: non_neg_integer(). -type duration() :: non_neg_integer().
-type duration_s() :: non_neg_integer(). -type duration_s() :: non_neg_integer().
-type bytesize() :: pos_integer(). -type bytesize() :: pos_integer().
-type comma_separated_list() :: list().
-typerefl_from_string({ip_port/0, emqx_schema, to_ip_port}). -typerefl_from_string({ip_port/0, emqx_schema, to_ip_port}).
-typerefl_from_string({duration/0, emqx_schema, to_duration}). -typerefl_from_string({duration/0, emqx_schema, to_duration}).
-typerefl_from_string({duration_s/0, emqx_schema, to_duration_s}). -typerefl_from_string({duration_s/0, emqx_schema, to_duration_s}).
-typerefl_from_string({bytesize/0, emqx_schema, to_bytesize}). -typerefl_from_string({bytesize/0, emqx_schema, to_bytesize}).
-typerefl_from_string({comma_separated_list/0, emqx_schema, to_comma_separated_list}).
-reflect_type([ -reflect_type([
duration/0, duration/0,
duration_s/0, duration_s/0,
bytesize/0, bytesize/0,
comma_separated_list/0,
ip_port/0 ip_port/0
]). ]).
-elvis([{elvis_style, dont_repeat_yourself, disable}]). -elvis([{elvis_style, dont_repeat_yourself, disable}]).