You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug cfn-guard produces a parsing error when a comment is used without a \n at the end of line
To Reproduce
Please supply:
Rule used rule.guard:
let aws_ec2_volume_resources = Resources.*[ Type == 'AWS::EC2::Volume' ]
#EOF
Note:
Most of the text editors will add a \n character at the end of the file, easiest way to create the rule.guard file is to run the following command: printf "let aws_ec2_volume_resources = Resources.*[ Type == 'AWS::EC2::Volume' ]\n#EOF"> rule.guard
Describe the bug
cfn-guard
produces a parsing error when a comment is used without a\n
at the end of lineTo Reproduce
Please supply:
rule.guard
:Note:
Most of the text editors will add a
\n
character at the end of the file, easiest way to create therule.guard
file is to run the following command:printf "let aws_ec2_volume_resources = Resources.*[ Type == 'AWS::EC2::Volume' ]\n#EOF"> rule.guard
template.json
:Command used:
cfn-guard validate -r rule.guard -d template.json
Output:
Expected behavior
no error should be produced and
cfn-guard
should proceed with the validation.Additional Context
I suspect that the error is caused due to the fact that the parser checks until it finds
\n
for comments which happens hereOperating System:
Ubuntu 20.04, Amazon Linux 2
The text was updated successfully, but these errors were encountered: