Package com.google.javascript.jscomp
Class ConformanceRules.BannedEnhance
java.lang.Object
com.google.javascript.jscomp.ConformanceRules.AbstractRule
com.google.javascript.jscomp.ConformanceRules.BannedEnhance
- All Implemented Interfaces:
CheckConformance.Rule
- Enclosing class:
ConformanceRules
Checks that file does not include an @enhance annotation for a banned namespace.
-
Constructor Summary
ConstructorsConstructorDescriptionBannedEnhance
(AbstractCompiler compiler, com.google.javascript.jscomp.Requirement requirement) -
Method Summary
Modifier and TypeMethodDescriptionprotected ConformanceRules.ConformanceResult
Return a precondition for this rule.Methods inherited from class com.google.javascript.jscomp.ConformanceRules.AbstractRule
check, report, tsIsAllowlisted
-
Constructor Details
-
BannedEnhance
public BannedEnhance(AbstractCompiler compiler, com.google.javascript.jscomp.Requirement requirement) throws CheckConformance.InvalidRequirementSpec
-
-
Method Details
-
checkConformance
- Specified by:
checkConformance
in classConformanceRules.AbstractRule
- Returns:
- Whether the code represented by the Node conforms to the rule.
-
getPrecondition
Description copied from interface:CheckConformance.Rule
Return a precondition for this rule.This method will only be called once (per rule) during the creation of the CheckConformance pass. Therefore, the return must be constant.
Returning null means that there is no precondition. This is convenient, but can be a major performance hit.
-