We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
PMD 现在有一个 MissingOverride 规则。
PMD 或 Findbugs 怎么样? PMD 使您甚至可以编写自己的规则(如果它在默认规则集中不是一次性的)。
https://pmd.github.io/pmd-6.3.0/pmd_userdocs_extending_writing_pmd_rules。 html
PMD now has a MissingOverride rule.
What about PMD or Findbugs? PMD enables that you can even write your own rule (if it isn't disposable in the default rule set).
https://pmd.github.io/pmd-6.3.0/pmd_userdocs_extending_writing_pmd_rules.html
我正在使用 Sonar,它会向我发出警告,但最重要的是,我正在使用 Eclipse(我的团队也是如此),并且我设置了一个选项“添加缺失的 @Overrides”以在保存操作时完成。
I am using Sonar wich gives me the warnings but most importantly I am using eclipse (and so does my team) and I have set an option "add missing @Overrides" to be done on save action.
一种方法是使用 TeamCity 的“检查”运行程序。我不确定它是否真的有资格在 IDE 外部运行,因为它是在 IntelliJ 中配置的,并且它通过在 TeamCity 端以无头模式运行 IntelliJ 来工作。
One way is to use TeamCity's "Inspection" runner. I'm not sure if it really qualifies as running outside the IDE since it's configured in IntelliJ and it works by running IntelliJ in headless mode on the TeamCity side.
Error Prone 有一个 MissingOverride 模式 看来 errorprone 是在编译时评估的。默认情况下这是一个警告,但我将其配置为错误。
Error Prone has a MissingOverride Pattern It appears that errorprone is evaluated at compile time. By default this is a warning but I configured it to be an error.
在 IntelliJ 2017 上,转到设置 ->编辑->检查->缺少 @Override 注释
图像示例 0(没有足够的信誉来发布图像)
On IntelliJ 2017, go to Settings -> Editor -> Inspections -> Missing @Override annotation
image example 0 (no enough reputation to post images)