Feature request: Serverless Rules support for sam validate linting
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 1.2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 52
Description
### Describe your idea/feature/enhancement
The team recently introduced the ability to use [cfn-lint](https://github.com/aws-cloudformation/cfn-lint) with `sam validate --lint`. This is great, but it does not support the ability to append rules like [**Serverless Rules**](https://github.com/awslabs/serverless-rules).
Serverless rules is a hugely beneficial[ rules set](https://awslabs.github.io/serverless-rules/rules/) 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](https://github.com/awslabs/serverless-application-model)
### Additional Details
https://awslabs.github.io/serverless-rules/
Contributor guide
Assessment
This issue has not been assessed yet.