Skip to content

Commit ddcbc64

Browse files
authored
Make default value a str (#3931)
1 parent 95dfc70 commit ddcbc64

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/cfnlint/rules/parameters/Default.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def match(self, cfn: Template) -> RuleMatches:
140140
default_value = paramvalue.get("Default")
141141
if default_value is not None and self.is_list(paramvalue):
142142
comma_delimited_default_values = [
143-
x.strip() for x in default_value.split(",")
143+
x.strip() for x in str(default_value).split(",")
144144
]
145145
for value in comma_delimited_default_values:
146146
param_cdl_matches.extend(

test/fixtures/templates/good/parameters/default.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,7 @@ Parameters:
7575
- three,four
7676
CDLWithoutDefault:
7777
Type: CommaDelimitedList
78-
78+
StringList:
79+
Type: List<String>
80+
Default: False
7981
Resources: {}

0 commit comments

Comments
 (0)