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

**URL:** <https://community.sonarsource.com/t/how-to-restrict-the-use-of-nosonar-and-suppresswarnings-in-sonarqube-9-9-2-community-edition/119764>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube\
**Created:** [July 26, 2024, 11:08am UTC](https://community.sonarsource.com/t/how-to-restrict-the-use-of-nosonar-and-suppresswarnings-in-sonarqube-9-9-2-community-edition/119764 "2024-07-26T11:08:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![anon67236913](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@anon67236913](https://community.sonarsource.com/u/anon67236913)\
**Post date:** [July 29, 2024, 6:01am UTC](https://community.sonarsource.com/t/how-to-restrict-the-use-of-nosonar-and-suppresswarnings-in-sonarqube-9-9-2-community-edition/119764/2 "2024-07-29T06:01:04Z")

</div>

Hi,

here’s the solution for Java

> [@Disable NOSONAR comment](https://community.sonarsource.com/t/disable-nosonar-comment/78942/4):
>
> In fact, as Sonarqube admin you need to activate two rules. java:NoSonar ‘Track uses of “NOSONAR” comments’ to prevent the use of //NOSONAR for hiding issues call https://$yoursonarhost/coding\_rules?open=java%3ANoSonar&rule\_key=java%3ANoSonar for activation java:S1309 ‘Track uses of “@SuppressWarnings” annotations’ with an appropriate whitelist to prevent some clever developers using @SuppressWarnings("all") in all their classes see documentation =\> [Java](https://docs.sonarqube.org/latest/analyzing-source-code/languages/java/#turning-issues-off) call https:/…

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

Gilbert

---

_[View the full topic](https://community.sonarsource.com/t/how-to-restrict-the-use-of-nosonar-and-suppresswarnings-in-sonarqube-9-9-2-community-edition/119764)._
