Disable NOSONAR comment

In fact, as Sonarqube admin you need to activate two rules.

  1. 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

  1. 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

call https://$yoursonarhost/coding_rules?open=java%3AS1309&rule_key=java%3AS1309
for activation and configuration of the whitelist

1 Like