问题描述
我看到 当前状态已关闭的改进。我被要求在这里提出我的问题。
I see this https://jira.sonarsource.com/browse/SONARJAVA-71 improvement which the current status is closed. I was asked to raise my question here.
我想知道如何实现修复,因为我试图使用最新的SonarJava 4.10.0.10260,但它仍然报告了带有@generated注释的类/方法的问题。请告知如何实施此修复程序。包含哪个版本的SonarJava版本此修复程序。谢谢!
I would like to know how to implement the fix because i tried to use latest SonarJava 4.10.0.10260, however it still reports issues on class/methods with @generated annotation. Please advise how to implement this fix. Which version of SonarJava release this fix is included. Thanks!
推荐答案
已在SonarJava Analyzer 4.9版本中实现,因此如果配置正确,您的SonarJava版本应忽略此类带注释的元素。
SONARAVA-71 has been implemented in version 4.9 of the SonarJava Analyzer, so your version of SonarJava should ignore such annotated elements if configured correctly.
现在,为了让分析器忽略的类和方法注释(并且只有) @ javax.annotation.Generated
被分析器忽略,请务必。
Now, in order to have classes ans methods annotated with (and only with) @javax.annotation.Generated
being ignored by the analyzer, be sure to provide the bytecode for your analysis.
这篇关于SonarJava-71使用javax.annotation.Generated进行批注时排除生成代码的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!