From 6ecae6d7a825eec2f89d46aceff19c562cfe1ef2 Mon Sep 17 00:00:00 2001 From: Chris Roche Date: Wed, 13 Sep 2023 16:14:55 -0700 Subject: [PATCH] Cleanup: replace deprecated OptCheckStringFormat --- internal/celext/lib.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/celext/lib.go b/internal/celext/lib.go index 099b10a..1a70b61 100644 --- a/internal/celext/lib.go +++ b/internal/celext/lib.go @@ -61,7 +61,7 @@ func (l lib) CompileOptions() []cel.EnvOption { cel.CrossTypeNumericComparisons(true), cel.EagerlyValidateDeclarations(true), // TODO: reduce this to just the functionality we want to support - ext.Strings(), + ext.Strings(ext.StringsValidateFormatCalls(true)), cel.Variable("now", cel.TimestampType), cel.Function("unique", l.uniqueMemberOverload(cel.BoolType, l.uniqueScalar), @@ -268,7 +268,6 @@ func (l lib) ProgramOptions() []cel.ProgramOption { return []cel.ProgramOption{ cel.EvalOptions( cel.OptOptimize, - cel.OptCheckStringFormat, //nolint:staticcheck ), } }