Skip to content

Include cfn-python-lint checks into sam validate #933

Closed

Description

@Dunedan

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 #686 (comment) (and probably others somewhere else). @heitorlessa just suggested in Slack to track it properly with such a feature request. So here it is. 🙂

Activity

  1. added
    type/feature
    area/validate
    on Jan 14, 2019
  2. added this to the Backlog milestone on Jan 18, 2019
  3. fatbasstard commented on Jan 21, 2019

    @fatbasstard

    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 😎

  4. Dunedan commented on Jan 21, 2019

    @Dunedan
    ContributorAuthor

    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.

  5. fatbasstard commented on Jan 21, 2019

    @fatbasstard

    Yes, you're completely right... My bad, I got enthousiastic 🎉

  6. added
    stage/pm-review
    on Oct 5, 2020
  7. self-assigned this
    on Dec 19, 2022
  8. removed
    stage/pm-review
    on Dec 20, 2022
  9. sriram-mv commented on Jan 12, 2023

    @sriram-mv
    Contributor

    Released with v1.69.0. Closing this issue.

  10. github-actions commented on Jan 12, 2023

    @github-actions
    Contributor

    ⚠️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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/validatemaintainer/need-responsetype/feature

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions