ToConfig converts the ASTValidator to an env.Validator specifying the validator name and the limit.
()
| 509 | |
| 510 | // ToConfig converts the ASTValidator to an env.Validator specifying the validator name and the limit. |
| 511 | func (v regexProgramSizeLimitValidator) ToConfig() *env.Validator { |
| 512 | return env.NewValidator(v.Name()).SetConfig(map[string]any{"limit": v.limit}) |
| 513 | } |
| 514 | |
| 515 | // Validate implements the ASTValidator interface method. |
| 516 | func (v bindNestingLimitValidator) Validate(e *Env, _ ValidatorConfig, a *ast.AST, iss *Issues) { |
nothing calls this directly
no test coverage detected