Cfn-python-lint: Alpine linux: tabs at the end of line breaks the linter

Created on 19 Feb 2019  路  5Comments  路  Source: aws-cloudformation/cfn-python-lint

Environment: cfn-lint v0.14.0, docker image: alpine3.8, python alpine version: 3.6.6-r0

content of cfn.yaml:

---
AWSTemplateFormatVersion: '2010-09-09'      
#...    see tabs the end of previous line   

Execution command: python3 -m cfnlint -t cfn.yaml

Actual result:

E0000 Expecting value
.cfn.yaml:1:1

screenshot

bug wontfix

All 5 comments

Seems to be just an Alpine thing but was able to replicate this. Going to have to do some more digging to understand why.

Actually so more testing has revealed this is a difference between the C yaml parser and the native python yaml parser. I can now replicate this on a mac when forcing to not use the yaml.cyaml

https://github.com/yaml/pyyaml/issues/116 looks like the issue tracking yaml 1.2 support in pyyaml or we would have to look into switching to ruamel.yaml

@kddejong - We're considering a move to runamel soon as well. Anecdotal commentary.

yea I was looking into that. Since we did some manipulation of the pyyaml parser I'm going to have to see how compatible ruamel.yaml will be. Considering the length of the issue alternative options may be needed.

Was this page helpful?
0 / 5 - 0 ratings