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