Skip to content

Feature request: Serverless Rules support for sam validate linting #4648

Description

@sliedig

Describe your idea/feature/enhancement

The team recently introduced the ability to use cfn-lint with sam validate --lint. This is great, but it does not support the ability to append rules like Serverless Rules.

Serverless rules is a hugely beneficial rules set that allows Serverless developers to run additional rules to validate infrastructure as code template against recommended Serverless best practices, across a numbers of AWS Services such as AWS Lambda, AWS Step Functions, Amazon API Gateway, Amazon SQS and SNS, Amazon EventBridge.

It would be great if we could provide a way to allow developers to append rules to sam validate linting capability.

Proposal

In order to use Serverless Rules today developers need to installl the rules and append them directly to cfn-lint command

cfn-lint template.yaml -a cfn_lint_serverless.rules

it would be useful to do the same with sam validate

sam validate --lint --template myTemplate.yaml --append cfn_lint_serverless.rules

or include the Serverless Rules by default so no additional parameters need to be passed.

Things to consider:

  1. Will this require any updates to the SAM Spec

Additional Details

https://awslabs.github.io/serverless-rules/

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions