ToConfig converts the ASTValidator to an env.Validator specifying the validator name and the nesting limit as an integer value: {"limit": int}
()
| 408 | // ToConfig converts the ASTValidator to an env.Validator specifying the validator name and the nesting limit |
| 409 | // as an integer value: {"limit": int} |
| 410 | func (v nestingLimitValidator) ToConfig() *env.Validator { |
| 411 | return env.NewValidator(v.Name()).SetConfig(map[string]any{"limit": v.limit}) |
| 412 | } |
| 413 | |
| 414 | // Validate implements the ASTValidator interface method. |
| 415 | func (v nestingLimitValidator) Validate(e *Env, _ ValidatorConfig, a *ast.AST, iss *Issues) { |
nothing calls this directly
no test coverage detected