Include cfn-python-lint checks into sam validate
Describe your idea/feature/enhancement
Currently sam validate only catches a very small subset of problems with SAM templates. For example it doesn't even catch when the AWS::Serverless-2016-10-31 transformation isn't specified in the template. It'd be great if users could be more confident that a template works if it passed sam validate successfully.
Proposal
For better validation cfn-python-lint comes to mind, which already does a great job detecting invalid CloudFormation and SAM templates. It'd be great if the checks done by cfn-python-lint would be included into sam validate as well. As both are implemented in Python it's probably straight forward to add such support.
The idea is not new and has already been suggested by @jfuss in https://github.com/awslabs/aws-sam-cli/issues/686#issuecomment-450193749 (and probably others somewhere else). @heitorlessa just suggested in Slack to track it properly with such a feature request. So here it is. :slightly_smiling_face:
Fun thing is that cfn-python-lint uses SAM for the Transformation. (before linting the template).. If SAM would use the linter, the circle is round 😎
I believe you confuse aws-sam-translator (which is part of the SAM repository) with the SAM CLI. cfn-python-lint depends on aws-sam-translator and so does the SAM CLI. So no circular dependencies, but both rely on aws-sam-translator instead.
Yes, you're completely right... My bad, I got enthousiastic :tada:
Released with v1.69.0. Closing this issue.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.