Interface CheckConformance.Rule

All Known Implementing Classes:
ConformanceRules.AbstractRule, ConformanceRules.BanCreateDom, ConformanceRules.BanCreateElement, ConformanceRules.BanElementSetAttribute, ConformanceRules.BanExecCommand, ConformanceRules.BanForOf, ConformanceRules.BanGlobalVars, ConformanceRules.BannedEnhance, ConformanceRules.BannedModsRegex, ConformanceRules.BanNonLiteralArgsToGoogStringConstFrom, ConformanceRules.BanNullDeref, ConformanceRules.BanSettingAttributes, ConformanceRules.BanStaticThis, ConformanceRules.BanThrowOfNonErrorTypes, ConformanceRules.BanUnknownDirectThisPropsReferences, ConformanceRules.BanUnknownThis, ConformanceRules.BanUnknownTypedClassPropsReferences, ConformanceRules.BanUnresolvedType, ConformanceRules.RequireUseStrict, ConformanceRules.StrictBanUnresolvedType
Enclosing class:
CheckConformance

public static interface CheckConformance.Rule
  • Method Details

    • getPrecondition

      default @Nullable CheckConformance.Precondition getPrecondition()
      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.

    • check

      void check(NodeTraversal t, Node n)
      Perform conformance check