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
41
42       -c INCLUDE_CHECKS [INCLUDE_CHECKS ...],            --include-checks IN‐
43       CLUDE_CHECKS [INCLUDE_CHECKS ...]
44              include rules whose id match these values
45
46       -m MANDATORY_CHECKS [MANDATORY_CHECKS ...],   --mandatory-checks MANDA‐
47       TORY_CHECKS [MANDATORY_CHECKS ...]
48              always  check  rules  whose id match these values, regardless of
49              template exclusions
50
51       -e, --include-experimental
52              Include experimental rules
53
54       -x CONFIGURE_RULES [CONFIGURE_RULES ...],      --configure-rule CONFIG‐
55       URE_RULES [CONFIGURE_RULES ...]
56              Provide configuration for a rule.  Format RuleId:key=value.
57
58              Example:
59                     E3012:strict=false
60
61       --config-file CONFIG_FILE
62              Specify the cfnlintrc file to use
63
64       -z CUSTOM_RULES, --custom-rules CUSTOM_RULES
65              Allows specification of a custom rule file.
66
67       -v, --version
68              Version of cfn-lint(1)
69
70       --output-file OUTPUT_FILE
71              Writes the output to the specified file, ideal for producing re‐
72              ports
73
74       --merge-configs
75              Merges lists between configuration layers
76
77   ADVANCED / DEBUGGING
78       -D, --debug
79              Enable debug logging
80
81       -I, --info
82              Enable information logging
83
84       -a APPEND_RULES [APPEND_RULES ...],    --append-rules APPEND_RULES [AP‐
85       PEND_RULES ...]
86              specify  one  or  more rules directories using one or more --ap‐
87              pend-rules arguments.
88
89       -o OVERRIDE_SPEC, --override-spec OVERRIDE_SPEC
90              A CloudFormation Spec override file that allows customization
91
92       -g, --build-graph
93              Creates a file in the same directory as the template that models
94              the template’s resources in dot(1) format
95
96       -s REGISTRY_SCHEMAS [REGISTRY_SCHEMAS ...],     --registry-schemas REG‐
97       ISTRY_SCHEMAS [REGISTRY_SCHEMAS ...]
98              one or more directories of CloudFormation Registry Schemas
99
100       -u, --update-specs
101              Update the CloudFormation Specs
102

EXAMPLES

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

SEE ALSO

117       dot(1)
118
119
120
121                                 December 2021                     CFN-LINT(1)
Impressum