aws-cloudformation / cfn-lint

CloudFormation Linter
MIT No Attribution
2.4k stars 576 forks source link

Condition satisfaction checks to raise error when unknown #3350

Closed kddejong closed 2 weeks ago

kddejong commented 2 weeks ago

Issue #, if available: fix #3325 fix #3348

Description of changes:

We currently do not have proper logic for handling complex functions in conditions and testing for satisfaction. As a result we are going to raise an error so we don't validate those values.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 84.61538% with 4 lines in your changes missing coverage. Please review.

Project coverage is 93.26%. Comparing base (ddd0940) to head (15c31c7).

Files Patch % Lines
src/cfnlint/jsonschema/validators.py 57.14% 3 Missing :warning:
src/cfnlint/conditions/conditions.py 83.33% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3350 +/- ## ========================================== - Coverage 93.30% 93.26% -0.04% ========================================== Files 322 323 +1 Lines 10926 10949 +23 Branches 2279 2284 +5 ========================================== + Hits 10194 10212 +18 - Misses 406 409 +3 - Partials 326 328 +2 ``` | [Flag](https://app.codecov.io/gh/aws-cloudformation/cfn-lint/pull/3350/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-cloudformation) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/aws-cloudformation/cfn-lint/pull/3350/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-cloudformation) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-cloudformation#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.