diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a1a9ec8b8..f34b42fe2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 0.20.1 +###### Fixes +- Update rule [E8003](https://github.com/aws-cloudformation/cfn-python-lint/blob/master/docs/rules.md#E8003) to support more functions inside a Fn::Equals + ### 0.20.0 ###### Features - Allow a rule's exception to be defined in a [resource's metadata](https://github.com/kddejong/cfn-python-lint/tree/Release/v0.20.0#resource-based-metadata) diff --git a/README.md b/README.md index 74afa0112d..759a918733 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ If you'd like cfn-lint to be run automatically when making changes to files in y ```yaml repos: - repo: https://github.com/aws-cloudformation/cfn-python-lint - rev: v0.20.0 # The version of cfn-lint to use + rev: v0.20.1 # The version of cfn-lint to use hooks: - id: cfn-python-lint files: path/to/cfn/dir/.*\.(json|yml|yaml)$ diff --git a/src/cfnlint/rules/conditions/Equals.py b/src/cfnlint/rules/conditions/Equals.py index 358026c57b..4407c62f02 100644 --- a/src/cfnlint/rules/conditions/Equals.py +++ b/src/cfnlint/rules/conditions/Equals.py @@ -57,22 +57,22 @@ def match(self, cfn): if len(element) == 1: for element_key in element.keys(): if element_key not in allowed_functions: - message = 'Fn::Equals element must be a string, Ref, or a Fn::FindInMap' + message = 'Fn::Equals element must be a supported function ({0})' matches.append(RuleMatch( equal_tree[:-1] + [index, element_key], - message.format() + message.format(', '.join(allowed_functions)) )) else: - message = 'Fn::Equals element must be a string, Ref, or a Fn::FindInMap' + message = 'Fn::Equals element must be a supported function ({0})' matches.append(RuleMatch( equal_tree[:-1] + [index], - message.format() + message.format(', '.join(allowed_functions)) )) elif not isinstance(element, (six.string_types, bool, six.integer_types, float)): - message = 'Fn::Equals element must be a string, Ref, or a Fn::FindInMap' + message = 'Fn::Equals element must be a String, Boolean, Number, or supported function ({0})' matches.append(RuleMatch( equal_tree[:-1] + [index], - message.format() + message.format(', '.join(allowed_functions)) )) return matches diff --git a/src/cfnlint/version.py b/src/cfnlint/version.py index 09a48ec781..03fb60064e 100644 --- a/src/cfnlint/version.py +++ b/src/cfnlint/version.py @@ -15,4 +15,4 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -__version__ = '0.20.0' +__version__ = '0.20.1'