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

Function inExemptFunction

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

Source from the content-addressed store, hash-verified

368}
369
370func inExemptFunction(e ast.NavigableExpr, exemptFunctions []string) bool {
371 parent, found := e.Parent()
372 for found {
373 if parent.Kind() == ast.CallKind {
374 fnName := parent.AsCall().FunctionName()
375 for _, exempt := range exemptFunctions {
376 if exempt == fnName {
377 return true
378 }
379 }
380 }
381 parent, found = parent.Parent()
382 }
383 return false
384}
385
386func isOptionalIndex(i int, optIndices []int32) bool {
387 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