我正在使用
dialyzer --output_plt lib.plt --build_plt --apps stdlib kernel mnesia ssl public_key crypto erts asn1 inets sasl odbc
Run Code Online (Sandbox Code Playgroud)
它吐出一些关于我不关心的模块中未知函数的错误。例如:
Compiling some key modules to native code... done in 1m10.81s
Creating PLT lib.plt ...
Unknown functions:
compile:file/2
compile:forms/2
compile:noenv_forms/2
Run Code Online (Sandbox Code Playgroud)
我可以告诉透析器忽略这些吗?我真的应该关心他们吗?
小智 6
要忽略您不想分析的特定函数的警告,您可以在模块中添加以下内容:
-dialyzer({nowarn_function, f/0}).
Run Code Online (Sandbox Code Playgroud)
或者这样可以避免模块中出现特定警告:
-dialyzer(no_improper_lists).
Run Code Online (Sandbox Code Playgroud)
完整信息:http : //erlang.org/doc/man/dialyzer.html#suppression