-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String format validator #775
String format validator #775
Conversation
1989e9d
to
3dc15dc
Compare
@DangerOnTheRanger would you mind taking a look to see if this matches your expectations? |
3dc15dc
to
0e1d73d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just had a couple small comments, nothing major or anything - LGTM otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way the options are configured (enabled by default) LGTM.
I'll defer to @DangerOnTheRanger on any specifics of the formatting code.
2703956
to
77f4dd4
Compare
LGTM |
Shift string format validation into the
ext.Strings()
library.This change also removes all references to the string format extensions within
the cel and interpreter packages, and shifts validation from an
InterpretableDecorator
to an
cel.ASTValidator
which is applied immediately after type-checking.Note to reviewers: the majority of the changes are present in the
ext/formatting.go
file, and contained within the
stringFormatValidator
. There are some subtle differencessuch as the new validator checks by function name only, and not by overload id (this
will be addressed in a future PR), and the argument length check applies to the original
call signature (size 1) rather than the internal call signature which includes the call
target as the first argument (size 2). Most of the rest of the code is quite similar
to what existed beforehand.
Closes #638