简体   繁体   English

SonarLint|SonarQube - 批量创建@SuppressWarnings

[英]SonarLint|SonarQube - Batch Create @SuppressWarnings

for an existing code base I want to add @SuppressWarnings("squid:xxx") for certain squids so that both goals "don't touch a running system" as well as "make sure no now issues creep in for new code" are satisfied.对于现有的代码库,我想为某些鱿鱼添加 @SuppressWarnings("squid:xxx") 以便两个目标“不接触正在运行的系统”以及“确保现在没有问题蔓延到新代码中”是使满意。

I know that it is possible to mark issues as "Won't fix" in SonarQube server, however I prefer to have as much as possible in code, and also SonarLint doesn't care about how issues are marked in SonarQube server.我知道可以在 SonarQube 服务器中将问题标记为“无法修复”,但是我更喜欢在代码中尽可能多地使用,而且 SonarLint 也不关心如何在 SonarQube 服务器中标记问题。

Have tried both SonarLint for Eclipse (2019-09) and IntelliJ (2019.3) hoping for a "Quick Fix" Option that will add @SuppressWarnings, but no luck.已经为 Eclipse (2019-09) 和 IntelliJ (2019.3) 尝试了 SonarLint,希望有一个“快速修复”选项可以添加@SuppressWarnings,但没有运气。

Any suggestions?有什么建议?

SonarLint doesn't care about how issues are marked in SonarQube server SonarLint 不关心如何在 SonarQube 服务器中标记问题

In connected mode, SonarLint will hide issues marked as false positive/won't fix on your SonarQube server.在连接模式下,SonarLint 将隐藏标记为误报/不会在您的 SonarQube 服务器上修复的问题。

hoping for a "Quick Fix" Option that will add @SuppressWarnings希望有一个“快速修复”选项可以添加@SuppressWarnings

Even if this is a supported feature, this is not something we want to promote.即使这是一个受支持的功能,这也不是我们想要推广的东西。 Most of our rules should avoid false positive at all cost.我们的大多数规则应该不惜一切代价避免误报。 If some rules are irrelevant to your project, just disable them.如果某些规则与您的项目无关,只需禁用它们即可。 If you encounter false positive, please open a thread on our community forum so that we could improve our analyzers.如果您遇到误报,请在我们的社区论坛发帖,以便我们改进分析器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM