Configure implements the ASTValidatorConfigurer interface and augments the list of functions to skip during homogeneous aggregate literal type-checks.
(config cel.MutableValidatorConfig)
| 155 | // Configure implements the ASTValidatorConfigurer interface and augments the list of functions to skip |
| 156 | // during homogeneous aggregate literal type-checks. |
| 157 | func (blockValidationExemption) Configure(config cel.MutableValidatorConfig) error { |
| 158 | functions := config.GetOrDefault(cel.HomogeneousAggregateLiteralExemptFunctions, []string{}).([]string) |
| 159 | functions = append(functions, "cel.@block") |
| 160 | return config.Set(cel.HomogeneousAggregateLiteralExemptFunctions, functions) |
| 161 | } |
| 162 | |
| 163 | // Validate is a no-op as the intent is to simply disable strong type-checks for list literals during |
| 164 | // when they occur within cel.@block calls as the arg types have already been validated. |
nothing calls this directly
no test coverage detected