Skip to content

Support SAM templates #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
glnds opened this issue Jun 4, 2020 · 1 comment
Open

Support SAM templates #3

glnds opened this issue Jun 4, 2020 · 1 comment

Comments

@glnds
Copy link

glnds commented Jun 4, 2020

You can run :CocInfo inside vim to see the coc-cfn-lint logs and you'll see whether your file is being detected as CloudFormation. It currently doesn't do this check by looking at filename. Instead, it looks at file contents. By default, it will detect the file as CloudFormation if it contains both "AWSTemplateFormatVersion" and "Resources". In my case, I'm working with non-standard template files that don't always contain both these lines, so I have set the cfnlint.detectCfnRegExps as follows:
"cfnlint.detectCfnRegExps": ["AWS::", "\n?"Resources"?\s*:"],

cfn-lint works out of the box on SAM templates as well. I would suggest to scan for both AWSTemplateFormatVersion and Transform: AWS::Serverless*

Just my 2 cents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants