禁用 IntelliJ 警告 [英] Disable IntelliJ Warnings

查看:31
本文介绍了禁用 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.

我该如何更改?

推荐答案

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

Go to Settings -> Inspections. Then you need to search through 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 it's an error, warning, etc. or just disable it altogether.

如果您搜索魔法"在设置"中,您会看到以下内容,这应该会有所帮助:

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

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

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