-
Notifications
You must be signed in to change notification settings - Fork 597
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
More intelligent determination of Cfn templates #1171
Comments
I've adopted the pattern of isolating my CloudFormation templates to a separate folder for a similar reason (e.g. to avoid errors running I also think file extension should not be the main way to identify template files. I think it would be reasonable to assume that a user can include |
Would like for this to continue to be at least the default 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, mwpearce/vscode-cfn-nag#6, joenye/coc-cfn-lint#3 (comment), #2497 |
I need help understanding the use case here. Linting is validation. If the linter finds a syntax error, is it still a CloudFormation template? How would you determine the extra parameter value for an arbitrary YAML/JSON file? The best way I can think of is by including it with the template itself as a file extension. cfn-lint can't enforce that, though, because the documentation says any file extension may be used. (I've suggested that a standard file extension be defined to enable this use case.)
I consider it bad form to exclude it, but the according to the template anatomy the The only required top-level key is So this is a valid template: Resources:
Placeholder:
Type: AWS::CloudFormation::WaitConditionHandle So I think the best cfn-lint could do is emit a warning that the temple doesn't declare a version. As of 0.58.0, it doesn't do that. |
For reference this is the logic for how we do this in the vscode plugin: |
Today any passed in file will be linted even if that file isn't YAML or JSON and/or if that YAML/JSON file is a CloudFormation template. Request is to add a parameter to
cfn-lint
that will validate that a YAML/JSON template is a CloudFormation template before linting it.The text was updated successfully, but these errors were encountered: