1CFN-LINT(1)                      User Commands                     CFN-LINT(1)
2
3
4

NAME

6       cfn-lint – CloudFormation Linter
7

SYNOPSIS

9       cfn-lint [OPTION...]  [TEMPLATE]
10

OPTIONS

12       -h, --help
13              Show a help message and exit
14
15   STANDARD
16       TEMPLATE
17              The CloudFormation template to be linted
18
19       -t TEMPLATE [TEMPLATE ...], --template TEMPLATE [TEMPLATE ...]
20              The CloudFormation template to be linted
21
22       -b, --ignore-bad-template
23              Ignore failures with Bad template
24
25       --ignore-templates IGNORE_TEMPLATES [IGNORE_TEMPLATES ...]
26              Ignore templates
27
28       -f {quiet,parseable,json,junit,pretty,sarif},                    --for‐
29       mat {quiet,parseable,json,junit,pretty,sarif}
30              Output Format
31
32       -l, --list-rules
33              list all the rules
34
35       -r REGIONS [REGIONS ...], --regions REGIONS [REGIONS ...]
36              list the regions to validate against.
37
38       -i IGNORE_CHECKS [IGNORE_CHECKS ...],               --ignore-checks IG‐
39       NORE_CHECKS [IGNORE_CHECKS ...]
40              only  check  rules  whose  id  do  not match these values -c IN‐
41              CLUDE_CHECKS [INCLUDE_CHECKS ...],          --include-checks IN‐
42              CLUDE_CHECKS [INCLUDE_CHECKS ...]   include rules whose id match
43              these     values     -m MANDATORY_CHECKS [MANDATORY_CHECKS ...],
44              --mandatory-checks MANDATORY_CHECKS [MANDATORY_CHECKS ...]   al‐
45              ways check rules whose id match these values, regardless of tem‐
46              plate exclusions
47
48       -e, --include-experimental
49              Include experimental rules
50
51       -x CONFIGURE_RULES [CONFIGURE_RULES ...],      --configure-rule CONFIG‐
52       URE_RULES [CONFIGURE_RULES ...]
53              Provide configuration for a rule.  Format RuleId:key=value.
54
55              Example:
56                     E3012:strict=false
57
58       --config-file CONFIG_FILE
59              Specify the cfnlintrc file to use
60
61       -z CUSTOM_RULES, --custom-rules CUSTOM_RULES
62              Allows specification of a custom rule file.
63
64       -v, --version
65              Version of cfn-lint(1)
66
67       --output-file OUTPUT_FILE
68              Writes the output to the specified file, ideal for producing re‐
69              ports
70
71       --merge-configs
72              Merges lists between configuration layers
73
74   ADVANCED / DEBUGGING
75       -D, --debug
76              Enable debug logging
77
78       -I, --info
79              Enable information logging
80
81       -a APPEND_RULES [APPEND_RULES ...],    --append-rules APPEND_RULES [AP‐
82       PEND_RULES ...]
83              specify one or more rules directories using one  or  more  --ap‐
84              pend-rules arguments.
85
86       -o OVERRIDE_SPEC, --override-spec OVERRIDE_SPEC
87              A CloudFormation Spec override file that allows customization
88
89       -g, --build-graph
90              Creates a file in the same directory as the template that models
91              the template’s resources in dot(1) format
92
93       -s REGISTRY_SCHEMAS [REGISTRY_SCHEMAS ...],     --registry-schemas REG‐
94       ISTRY_SCHEMAS [REGISTRY_SCHEMAS ...]
95              one or more directories of CloudFormation Registry Schemas
96
97       -u, --update-specs
98              Update the CloudFormation Specs
99

EXAMPLES

101       Basic:
102              cfn-lint test.yaml
103
104       Ignore a rule:
105              cfn-lint -i E3012 -- test.yaml
106
107       Configure a rule:
108              cfn-lint -x E3012:strict=false -t test.yaml
109
110       Lint all yaml files in a folder:
111              cfn-lint dir/**/*.yaml
112

SEE ALSO

114       dot(1)
115
116
117
118                                 December 2021                     CFN-LINT(1)
Impressum