ASTValidator defines a singleton interface for validating a type-checked Ast against an environment. Note: the Issues argument is mutable in the sense that it is intended to collect errors which will be reported to the caller.
| 98 | // Note: the Issues argument is mutable in the sense that it is intended to collect errors which will be |
| 99 | // reported to the caller. |
| 100 | type ASTValidator interface { |
| 101 | // Name returns the name of the validator. Names must be unique. |
| 102 | Name() string |
| 103 | |
| 104 | // Validate validates a given Ast within an Environment and collects a set of potential issues. |
| 105 | // |
| 106 | // The ValidatorConfig is generated from the set of ASTValidatorConfigurer instances prior to |
| 107 | // the invocation of the Validate call. The expectation is that the validator configuration |
| 108 | // is created in sequence and immutable once provided to the Validate call. |
| 109 | // |
| 110 | // See individual validators for more information on their configuration keys and configuration |
| 111 | // properties. |
| 112 | Validate(*Env, ValidatorConfig, *ast.AST, *Issues) |
| 113 | } |
| 114 | |
| 115 | // ConfigurableASTValidator supports conversion of an object to an `env.Validator` instance used for |
| 116 | // YAML serialization. |
no outgoing calls
no test coverage detected