禁用IntelliJ警告 [英] Disable IntelliJ Warnings

查看:287
本文介绍了禁用IntelliJ警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IntelliJ突出显示某些错误(不妨碍成功编译),这与突出显示真实错误的方式相同。例如,幻数不是真正的错误,但它将以与不兼容类型错误完全相同的方式标记。

It really annoys me that IntelliJ highlights certain 'errors' (that don't prevent successful compilation) the same way that real errors are highlighted. For example, a magic number is not really an error, but it will be flagged in exactly the same way as an incompatible type error.

我该如何更改?

推荐答案

转到首选项 - >检查。然后,您需要通过长列表搜索违规检查,您可以通过将鼠标悬停在边距中的警告标记上来获取其名称。您可以更改检查的严重性,无论是错误,警告等,还是只是完全禁用它。

go to Preferences -> Inspections. Then you need to search thru the long list for the offending inspection, which you can get the name of by hovering on the warning marker in the margin. You can change the severity of the inspection, whether its an error, warning, etc or just disable it altogether.

编辑:如果您在首选项中搜索魔术,你得到以下信息,这应该会有所帮助:

if you search for "magic" in preferences, you get the following, which should be helpful:

这篇关于禁用IntelliJ警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆