I sometimes want to suppress individual warnings.
For instance, I use a logger for my java web server, but I want to output an error and quit if the configuration is missing- I want it to go to stderr as well as the logger.
What rune do I put in @SuppressWarnings("rune")
to suppress the S106 warning?
But in general, for a given random warning, where do I find the doc that tells me how to suppress it?
it’s also possible to suppress more than one rule via @SuppressWarnings({“squid:xxx”,“squid:xxx”})
See documentation
As Sonarqube admin be sure to use:
squid:S1309 ‘Track uses of “@SuppressWarnings” annotations’
with an appropriate whitelist to prevent some clever developers
using @SuppressWarnings("all") in all their classes
squid:NoSonar ‘Track uses of “NOSONAR” comments’
to prevent the use of //NOSONAR for hiding issues