class SuppressDocWarningsGuard extends WarningsGuard
@suppress
annotations.
Works by looking at the AST node associated with the warning, and looking at parents of the node until it finds a function or a script. For this reason, it doesn't work for warnings without an associated AST node, eg, the ones in parsing/IRFactory. They can be turned off with jscomp_off.
WarningsGuard.Priority
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
private java.util.Map<java.lang.String,DiagnosticGroupWarningsGuard> |
suppressors
Warnings guards for each suppressible warnings group, indexed by name.
|
Constructor and Description |
---|
SuppressDocWarningsGuard(java.util.Map<java.lang.String,DiagnosticGroup> suppressibleGroups)
The suppressible groups, indexed by name.
|
Modifier and Type | Method and Description |
---|---|
int |
getPriority()
The priority in which warnings guards are applied.
|
CheckLevel |
level(JSError error)
Returns a new check level for a given error.
|
disables, enables, makeNonStrict
private static final long serialVersionUID
private final java.util.Map<java.lang.String,DiagnosticGroupWarningsGuard> suppressors
SuppressDocWarningsGuard(java.util.Map<java.lang.String,DiagnosticGroup> suppressibleGroups)
public CheckLevel level(JSError error)
WarningsGuard
level
in class WarningsGuard
error
- a reported error.public int getPriority()
WarningsGuard
getPriority
in class WarningsGuard