How to Restrict the Use of NOSONAR and @SuppressWarnings in SonarQube 9.9.2 Community Edition

I’m currently using SonarQube 9.9.2 Community Edition for our code quality management. I’ve noticed that many developers in our team are using NOSONAR comments and @SuppressWarnings annotations to suppress validations in various languages such as Java, HTML, JavaScript, XML, etc.

While these annotations can be useful in specific scenarios, they are often overused, potentially hiding critical issues that should be addressed. I would like to restrict the use of NOSONAR and @SuppressWarnings to ensure that all code quality issues are properly addressed rather than suppressed. How to detect and flag the use of NOSONAR and @SuppressWarnings in different languages?
Any help or suggestions on managing this in SonarQube Community Edition would be greatly appreciated!

Thank you in advance!

Hi,

here’s the solution for Java

See for which languages a Track uses of "NOSONAR" comments rule is available
https://<yoursonarhost>/coding_rules?q=nosonar

Gilbert

Thank you. But for Javascript, Typescript, etc.,