ToConfig converts the ASTValidator to an env.Validator specifying the validator name and the nesting limit as an integer value: {"limit": int}
()
| 492 | // ToConfig converts the ASTValidator to an env.Validator specifying the validator name and the nesting limit |
| 493 | // as an integer value: {"limit": int} |
| 494 | func (v bindNestingLimitValidator) ToConfig() *env.Validator { |
| 495 | return env.NewValidator(v.Name()).SetConfig(map[string]any{"limit": v.limit}) |
| 496 | } |
| 497 | |
| 498 | // Validate implements the ASTValidator interface method. |
| 499 | func (v bindNestingLimitValidator) Validate(e *Env, _ ValidatorConfig, a *ast.AST, iss *Issues) { |
nothing calls this directly
no test coverage detected