Class LensContractValidator

java.lang.Object
com.arc_e_tect.gradle.trackerlens.contract.LensContractValidator

public class LensContractValidator extends Object
Enforces every ContractRule against a generated dashboard file.

This validator never inspects text content - only the structural presence of the classes and data-* attributes each ContractRule declares, per the "surrounding text is not part of the contract" rule described on ContractRule itself.

  • Constructor Details

    • LensContractValidator

      public LensContractValidator()
      Creates a new LensContractValidator.
  • Method Details

    • validate

      public List<Violation> validate(File html)
      Validates html against every ContractRule.
      Parameters:
      html - the dashboard HTML file to validate
      Returns:
      every violation found, in ContractRule declaration order; empty when html conforms to the contract