ToConfig converts the ASTValidator to an env.Validator specifying the validator name and the limit.
()
| 500 | |
| 501 | // ToConfig converts the ASTValidator to an env.Validator specifying the validator name and the limit. |
| 502 | func (v regexProgramSizeLimitValidator) ToConfig() *env.Validator { |
| 503 | return env.NewValidator(v.Name()).SetConfig(map[string]any{"limit": v.limit}) |
| 504 | } |
| 505 | |
| 506 | // Validate implements the ASTValidator interface method. |
| 507 | func (v bindNestingLimitValidator) Validate(e *Env, _ ValidatorConfig, a *ast.AST, iss *Issues) { |
nothing calls this directly
no test coverage detected