martysweet/cfn-lint

Zero length CommaDelimitedList will have zero commas

lorengordon opened this issue · 1 comments

We have a CommaDelimitedList parameter that is optional, using a condition. When unset, it is an empty string, and so there are zero commas because it is a zero length list. This works fine, but cfn-lint throws this error:

Resource: Parameters > //ParamName//
Message: Parameter //ParamName// contains a CommaDelimitedList where the number of commas appears to be equal or greater than the list of items.
Documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html

This should be pretty easy to fix, there is one segment of code which does this validation, a couple of extra tests and a quick edit should be all for this. Might get a chance later this week to look, but I'm happy to merge PRs if you have the time.