MCPcopy Create free account
hub / github.com/cel-expr/cel-go / inExemptFunction

Function inExemptFunction

cel/validator.go:408–422  ·  view source on GitHub ↗
(e ast.NavigableExpr, exemptFunctions []string)

Source from the content-addressed store, hash-verified

406}
407
408func inExemptFunction(e ast.NavigableExpr, exemptFunctions []string) bool {
409 parent, found := e.Parent()
410 for found {
411 if parent.Kind() == ast.CallKind {
412 fnName := parent.AsCall().FunctionName()
413 for _, exempt := range exemptFunctions {
414 if exempt == fnName {
415 return true
416 }
417 }
418 }
419 parent, found = parent.Parent()
420 }
421 return false
422}
423
424func isOptionalIndex(i int, optIndices []int32) bool {
425 for _, optInd := range optIndices {

Callers 1

ValidateMethod · 0.85

Calls 4

ParentMethod · 0.65
KindMethod · 0.65
FunctionNameMethod · 0.65
AsCallMethod · 0.65

Tested by

no test coverage detected