fix(dialyzer): incorrect function spec

This commit is contained in:
Shawn 2021-06-03 11:27:06 +08:00 committed by Rory Z
parent 03519d7e61
commit 9617b65d52
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{erl_opts, [ debug_info
, nowarn_unused_import
, {d, 'RESOURCE_DEBUG'}
%, {d, 'RESOURCE_DEBUG'}
]}.
{erl_first_files, ["src/emqx_resource_transform.erl"]}.

View File

@ -223,7 +223,7 @@ load_instances_from_dir(Dir) ->
load_instance_from_file(File) ->
emqx_resource_instance:load_file(File).
-spec load_instance_from_config(binary() | map()) -> ok.
-spec load_instance_from_config(binary() | map()) -> {ok, resource_data()} | {error, term()}.
load_instance_from_config(Config) ->
emqx_resource_instance:load_config(Config).

View File

@ -29,7 +29,7 @@ parse_transform(Forms, _Opts) ->
debug_print(Mod, Ts) ->
{ok, Io} = file:open("./" ++ atom_to_list(Mod) ++ ".trans.erl", [write]),
do_debug_print(Io, Ts),
_ = do_debug_print(Io, Ts),
file:close(Io).
do_debug_print(Io, Ts) when is_list(Ts) ->