简体   繁体   中英

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.

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.

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.

Any suggestions?

SonarLint doesn't care about how issues are marked in SonarQube server

In connected mode, SonarLint will hide issues marked as false positive/won't fix on your SonarQube server.

hoping for a "Quick Fix" Option that will add @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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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