Skip to content
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

Validators for common literals and use cases #765

Merged
merged 3 commits into from
Jul 10, 2023

Conversation

TristonianJones
Copy link
Collaborator

@TristonianJones TristonianJones commented Jul 6, 2023

Introduce validators for duration, timestamp, and regex string literals as well as support for homogeneous aggregate literals with a carve-out for string format calls.

Closes #359
Closes #496
Closes #655

Copy link
Collaborator Author

@TristonianJones TristonianJones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DangerOnTheRanger @jpbetz @cici37 What do you think of the validator support being added here? I 'll update the string formatting checks to happen immediately after type-check in a subsequent PR, but I wanted to showcase what could be done with the latest improvements. I'm also tempted to update the checker cost model to use the new NavigableExpr type since it's more thorough than the decorators and easier to manage. Thoughts?

This PR will be introduced after #762 is reviewed and submitted.

@TristonianJones TristonianJones force-pushed the ast-validate branch 5 times, most recently from 308ea29 to 3fbbe99 Compare July 7, 2023 17:05
@TristonianJones TristonianJones marked this pull request as ready for review July 7, 2023 17:06
@TristonianJones TristonianJones requested a review from l46kok July 7, 2023 17:08
Introduce validators for duration, timestamp, and regex string literals
as well as support for homogeneous aggregate literals with a carveout
for string format calls.
cel/env.go Show resolved Hide resolved
cel/validator.go Outdated Show resolved Hide resolved
cel/validator.go Outdated Show resolved Hide resolved
cel/validator.go Show resolved Hide resolved
cel/validator.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants