0

Is there a way to see all the violations that are being ignored via @SuppressWarnings? I know that we can see everything marked as a false positive in the tool, but what about what was ignored due to the annotation. Is there a way to audit everything that was ignored?

For example, by annotating a variable with @SuppressWarnings("squid:S2039"), will disable the rule Member variable visibility should be specified, and it won't show up on SonarQube, which is expected. However, if we want to see everything that was suppressed, is there a way to see it in the tool?

agabrys
  • 8,728
  • 3
  • 35
  • 73
Diego
  • 1

1 Answers1

0

You may enable the Track uses of "@SuppressWarnings" annotations rule. It is possible to configure a whitelist of warnings which should be accepted like serial,unchecked. List of the "standard" warnings is here: What is the list of valid @SuppressWarnings warning names in Java?

agabrys
  • 8,728
  • 3
  • 35
  • 73