Skip to content

Commit

Permalink
Merge pull request aws-cloudformation#875 from kddejong/Release/v0.20.1
Browse files Browse the repository at this point in the history
Release/v0.20.1
kddejong authored May 8, 2019
2 parents 868b226 + a6e2c9a commit a76e953
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)$
12 changes: 6 additions & 6 deletions src/cfnlint/rules/conditions/Equals.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/cfnlint/version.py
Original file line number Diff line number Diff line change
@@ -15,4 +15,4 @@
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""

__version__ = '0.20.0'
__version__ = '0.20.1'

0 comments on commit a76e953

Please sign in to comment.