How to SupressWarnings for Sonar Security Hotspots?
Sonarlint/SonarQube allows you to use comments for disabling analysis in specific lines. In order to do this, you can just add a comment with the text NOSONAR
in the same line:
Random rand=new Random();//NOSONAR not used in secure contexts
Aside from this, you can mark Security Hotspots as resolved in the web Dashboard of SonarQube. In order to do this, you need to navigate to the Security Hotspot and mark it as not an issue. You might even want to disable that specific type of Security Hotspot entirely if it is generally not applicable for your project.
标签:Hotspots,SupressWarnings,Hotspot,How,Sonar,Security From: https://www.cnblogs.com/chucklu/p/17713900.html