@Inherited @Documented @Target(value=TYPE) @Retention(value=RUNTIME) public @interface SuppressWarningsKeys
SuppressWarnings
annotation. Any of the given arguments suppresses all warnings related to the
checker.
In order for this annotation to have an effect, it must be placed on the declaration of a
class that extends SourceChecker
.
For example, warnings issued by the Nullness Checker can be suppressed using
@SuppressWarnings("nullness")
because NullnessChecker
is annotated with
@SuppressWarningsKey("nullness")
.
TODO: the previous paragraph about the Nullness Checker is out-of-date. We only consider this meta-annotation on the most-concrete SourceChecker subclass and only use the suppression keys listed there. For the Nullness Checker we add multiple suppression keys along the hierarchy. Should we change the semantics of this annotation to look for it on all classes from the most-concrete class up to SourceChecker? That would make the behavior consistent with e.g. our SupportedOptions. Is there ever a reason where that would be unwanted?
public abstract String[] value
SuppressWarnings