# Find NOSONARs, that don't hit any (active) rule

**URL:** <https://community.sonarsource.com/t/find-nosonars-that-dont-hit-any-active-rule/34377>\
**Category:** Suggest new features\
**Tags:** sonarqube, sonarqube-ide\
**Created:** [November 12, 2020, 9:28am UTC](https://community.sonarsource.com/t/find-nosonars-that-dont-hit-any-active-rule/34377 "2020-11-12T09:28:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mfroehlich](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@mfroehlich](https://community.sonarsource.com/u/mfroehlich)\
**Post date:** [November 12, 2020, 9:28am UTC](https://community.sonarsource.com/t/find-nosonars-that-dont-hit-any-active-rule/34377/1 "2020-11-12T09:28:18Z")

</div>

I would like to suggest a scan mode, that detects all NOSONAR comments, that don’t hind any finding of an active rule. Maybe this could even be implemented as a rule itself.

I think, any time you place a NOSONAR because of a false-positive or you later deactive the rule, that was hitting at that line, you will want to remove these NOSONAR comments. Therefore you need to find them.

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [November 12, 2020, 10:07am UTC](https://community.sonarsource.com/t/find-nosonars-that-dont-hit-any-active-rule/34377/2 "2020-11-12T10:07:29Z")

</div>

Hey there. Is there a specific language you’re interested in having this for?

---

<div class="post-metadata">

**Author:** ![mfroehlich](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@mfroehlich](https://community.sonarsource.com/u/mfroehlich)\
**Post date:** [November 12, 2020, 10:37am UTC](https://community.sonarsource.com/t/find-nosonars-that-dont-hit-any-active-rule/34377/3 "2020-11-12T10:37:03Z")

</div>

Hey, yes, I am using Java.

I thought, this was language independent.

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [November 12, 2020, 10:42am UTC](https://community.sonarsource.com/t/find-nosonars-that-dont-hit-any-active-rule/34377/4 "2020-11-12T10:42:28Z")

</div>

It’s (for better or worse) not, and in good news there’s already a ticket on the topic: [SONARJAVA-2749](https://jira.sonarsource.com/browse/SONARJAVA-2749)

---

<div class="post-metadata">

**Author:** ![mfroehlich](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@mfroehlich](https://community.sonarsource.com/u/mfroehlich)\
**Post date:** [November 12, 2020, 10:45am UTC](https://community.sonarsource.com/t/find-nosonars-that-dont-hit-any-active-rule/34377/5 "2020-11-12T10:45:56Z")

</div>

Fine, thanks.
