@SuppressWarnings should work regardless of language. I personally would need it for PHP, but it is generally useful for all languages:

  • //NOSONAR comment is not a good alternative (and afaik no longer supported), since it 1) works for just one line (so no warnings concerning blocks or whole methods) and 2) ignores all warnings, not just specific ones
  • mark issues as Resolve/Won’t Fix in SonarQube is as well no good alternative, since 1) that info is lost on some refactorings (e.g. move method, rename class etc.) and 2) it does not show in the code so developers might wonder why sonarqube does not show obviously bad code and 3) it provides no information for QA on bad practices (like e.g. marking all issues as won’t fix instead of fixing them)

IMHO @SuppressWarings the FindBugs way is best, since it requires a justification @SuppressFBWarnings(value = “NAME_OF_THE_FINDBUGS_RULE_TO_IGNORE”, justification = “Why you choose to ignore it”)