当我做
mix compile
Run Code Online (Sandbox Code Playgroud)
我收到类似的消息
warning: variable "test_val" is unused
lib/myapp/mymodule.ex:46
Run Code Online (Sandbox Code Playgroud)
我只是在做一个业余项目,暂时不关心这些警告。有办法关掉它吗?
这看起来不可能,但我可能是错的。
https://groups.google.com/forum/#!topic/elixir-lang-talk/XBnap4u6OkM
https://elixirforum.com/t/is-there-a-way-to-suppress-warnings-about-unused-variables/8637/7
生成警告的代码(据我所知)是elixir_errors:warn并且没有任何可以关闭的标志。
https://github.com/elixir-lang/elixir/search?p=1&q=%3Aelixir_errors.warn&type=&utf8=%E2%9C%93
看起来也没有可以添加任何代码注释来抑制错误。
考虑一下 Elixir 非常固执己见的观点的另一个方面(与“只有一个格式化程序,并且没有配置”一起)
| 归档时间: |
|
| 查看次数: |
4791 次 |
| 最近记录: |