如何在 Intellij IDEA 中关闭注释的错误验证? [英] How do I turn off error validation for annotations in Intellij IDEA?

查看:102
本文介绍了如何在 Intellij IDEA 中关闭注释的错误验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个开发人员同行,他使用 Eclipse,它会在我们的 JUnit 测试中自动在不同位置插入注释.但是,当我在IDEA中打开测试时,注解是红色下划线,注解写着实现接口方法时不允许@Override".我真的不在乎注释.因此它不会让我构建,我需要在 IDE 或项目设置中关闭验证.我已取消选中所有 IDE 和项目设置的项目设置">错误"下的每个复选框,它仍然突出显示红色.我不想在 Messages 选项卡下单独排除每个注释.帮助!谢谢!

I have a developer counterpart who uses Eclipse, which inserts annotations in various positions automatically in our JUnit tests. However, when I open the test in IDEA, the annotation is underlined red, and the annotation reads "@Override is not allowed when implementing interface method". I don't really care about the annotation. It won't let me build because of this, and I need that validation turned off in the IDE or project settings. I've unchecked every single checkbox under Project Settings > Errors for all IDE and project settings, and it still underlines red. I don't want to have to exclude every single annotation individually under the Messages tab. Help! Thanks!

推荐答案

项目结构中|项目对话框,将项目语言级别更改为6.0 - @Override in interfaces.

这篇关于如何在 Intellij IDEA 中关闭注释的错误验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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