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

Skip state machine validation when using a function #3770

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import cfnlint.data.schemas.other.resources
import cfnlint.data.schemas.other.step_functions
import cfnlint.helpers
from cfnlint.helpers import is_function
from cfnlint.jsonschema import ValidationError, ValidationResult, Validator
from cfnlint.rules.jsonschema.CfnLintJsonSchema import CfnLintJsonSchema, SchemaDetails
from cfnlint.schema.resolver import RefResolver
Expand Down Expand Up @@ -64,6 +65,9 @@ def validate(
# so we can run this now
for k in definition_keys:
value = instance.get(k)
fn_name, _ = is_function(value)
if fn_name:
continue
if not value:
continue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,11 @@ def rule():
),
],
),
(
"Using a function",
{"Definition": {"Fn::Join": ["\n", []]}},
[],
),
],
)
def test_validate(
Expand Down
Loading