id = "cfn-lint" name = "cfn-lint" homepage = "https://github.com/aws-cloudformation/cfn-lint" description = "Validate AWS CloudFormation yaml/json templates against the AWS CloudFormation resource provider schemas and additional checks." executables = ["cfn-lint"] [dotfiles] # The project's README (https://github.com/aws-cloudformation/cfn-lint#config- # file) says the home-level config is ~/.cfnlintrc. The .cfnlintrc variants in # a working directory are project files, so only the user-level file is named. paths = ["~/.cfnlintrc"] exclude = [] secret = [] side_effect = false [commands] format = 1 label = "Lint templates" description = "Check CloudFormation templates against the resource schemas and rules. Custom rules, spec updates and graph options are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "readme" kind = "manual" url = "https://github.com/aws-cloudformation/cfn-lint/blob/main/README.md" revision = "2026-10-27" evidence = """ - `cfn-lint -t template.yaml` - `cfn-lint -t template1.yaml template2.yaml` - `cfn-lint -r us-east-1 ap-south-1 -- template.yaml` | -t, --template | | filename | Alternative way to specify Template file path to the file that needs to be tested by cfn-lint | | --parameters | parameters | | Specify a list of parameters using the format `Key=Value` | | -f, --format | format | quiet, parseable, json, junit, pretty, sarif | Output format | | -l, --list-rules | | | List all the rules | | -r, --regions | regions | [REGIONS [REGIONS ...]], ALL_REGIONS | Test the template against many regions. | | -b, --ignore-bad-template | ignore_bad_template | | Ignores bad template errors | | -i, --ignore-checks | ignore_checks | [IGNORE_CHECKS [IGNORE_CHECKS ...]] | Only check rules whose ID do not match or prefix these values. | | -e, --include-experimental | include_experimental | | Whether rules that still in an experimental state should be included in the checks | | --non-zero-exit-code | | informational (default), warning, error, none] | Exit code will be non zero from the specified rule class and higher | """ [[commands.field]] id = "templates" label = "Templates" description = "Template files or globs. Leave empty to use the config file." type = "path" position = 0 multiple = true path = { kind = "file", role = "input" } sources = ["readme"] [[commands.field]] id = "format" label = "Output format" type = "enum" option = ["--format", "-f"] choices = [{ value = "quiet", label = "quiet" }, { value = "parseable", label = "parseable" }, { value = "json", label = "JSON" }, { value = "junit", label = "JUnit" }, { value = "pretty", label = "pretty" }, { value = "sarif", label = "SARIF" }] sources = ["readme"] [[commands.field]] id = "regions" label = "Regions" description = "Region names, or ALL_REGIONS. Put templates after -- when giving several regions." type = "string" option = ["--regions", "-r"] multiple = true sources = ["readme"] [[commands.field]] id = "parameters" label = "Parameters" description = "Key=Value pairs." type = "string" option = ["--parameters"] multiple = true sources = ["readme"] [[commands.field]] id = "ignore_checks" label = "Ignore rules" description = "Rule IDs or prefixes, e.g. W or W2001." type = "string" option = ["--ignore-checks", "-i"] multiple = true sources = ["readme"] [[commands.field]] id = "include_experimental" label = "Include experimental rules" type = "boolean" option = ["--include-experimental", "-e"] sources = ["readme"] [[commands.field]] id = "ignore_bad_template" label = "Ignore bad templates" type = "boolean" option = ["--ignore-bad-template", "-b"] sources = ["readme"] [[commands.field]] id = "non_zero_exit_code" label = "Non-zero exit from" type = "enum" option = ["--non-zero-exit-code"] choices = [{ value = "informational", label = "informational" }, { value = "warning", label = "warning" }, { value = "error", label = "error" }, { value = "none", label = "none" }] sources = ["readme"] [[commands.field]] id = "list_rules" label = "List all rules" type = "boolean" option = ["--list-rules", "-l"] sources = ["readme"] [[commands.task]] id = "lint" label = "Lint a template" fields = ["templates", "format", "ignore_checks"] required = ["templates"] [[commands.task]] id = "rules" label = "List rules" fields = ["list_rules"] required = ["list_rules"] set = { list_rules = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["templates", "format", "regions", "parameters", "list_rules"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["ignore_checks", "include_experimental", "ignore_bad_template", "non_zero_exit_code"]