If you are thinking of creating or proposing a new rule, please follow the process outline below. The first step before adding a new rule is to submit an issue to collect feedback from other members of the community.
Before starting the implementation of a new rule, please create an issue using the New rule template. This will allow members of the community to provide feedback on its implementation, if it meets the needs of most serverless users, if it's the right level, etc.
# TODO: set the rule nameclass__Rule(CloudFormationLintRule):# TODO: set docstring""" Ensure that ... """# TODO: update these valuesid="..."# noqa: VNE003shortdesc="..."description="Ensure that ..."source_url="..."tags=["lambda"]_message="... {} ..."defmatch(self,cfn):# TODO: update docstring""" Match against ... """matches=[]# TODO: set resource typeforkey,valueincfn.get_resources(["..."]).items():# TODO: set property nameprop=value.get("Properties",{}).get("...",None)ifpropisNone:matches.append(RuleMatch(["Resources",key],self._message.format(key)))returnmatches
Please use the following template when writing documentation for a rule. Each rule goes into a separate markdown file into the relevant service folder. For example, a rule for AWS Lambda would go into the docs/rules/lambda/ folder.