Skip to content
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

Recognize more CloudFormation templates #6

Open
PatMyron opened this issue Jul 30, 2020 · 0 comments
Open

Recognize more CloudFormation templates #6

PatMyron opened this issue Jul 30, 2020 · 0 comments

Comments

@PatMyron
Copy link

Since AWSTemplateFormatVersion is optional, this CloudFormation template recognition logic won't recognize some CloudFormation templates:

const is_cfn_regex = new RegExp('"?AWSTemplateFormatVersion"?');
let is_cfn = false;
const text = document.getText();
if (is_cfn_regex.exec(text)) {
is_cfn = true;
}

Similar discussions: aws-cloudformation/cfn-lint-visual-studio-code#99, aws/aws-toolkit-jetbrains#1715 (comment), https://github.com/github/super-linter/pull/231#discussion_r445708695

The CloudFormation Linter Visual Studio Code extension has CloudFormation template recognition logic in TypeScript that can be borrowed

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

1 participant