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

updating docs, adding is_null and is_float operators #398

Merged
merged 1 commit into from Aug 14, 2023

Conversation

joshfried-aws
Copy link
Contributor

Issue #, if available:
#377

Description of changes:
Clarified the description for the exists unary function in guard. Previously said it could be used in place of where a dev would use != null in other languages. The team believes this was slightly misleading. Exists is used to check if a query is resolved, its value doesn't matter (meaning it can be any valid value for guard, including null) and still pass.

On that note we added a way to check if a value is null, using the is_null operator. Doing this we also noticed that even though our docs explicitly state we support an is_float operation, that wasn't previously true. For this reason we added support for an is_float operation as well.

I also noticed a slight bug with the yaml loader, where we would resolve unquoted null and ~ keywords to strings of those values. Now we check the value of a string and match against those 2 before converting to a string value. I also added tests for this case.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@joshfried-aws joshfried-aws merged commit 81667cc into aws-cloudformation:main Aug 14, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants