Skip to content

Commit

Permalink
Skip state machine validation when using a function (#3770)
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong authored Oct 18, 2024
1 parent a5672f0 commit 0a31357
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
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

0 comments on commit 0a31357

Please sign in to comment.