puppet-lint (original) (raw)
Blocks of lines in your manifest can be ignored by boxing them in withlint:ignore:<check name>
and lint:endignore
comments
class foo {
$bar = 'bar'
# lint:ignore:double_quoted_strings
$baz = "baz"
$gronk = "gronk"
# lint:endignore
}
You can also ignore just a single line by adding a trailing lint:ignore:<check name>
comment to the line
$this_line_has_a_really_long_name_and_value = "[snip]" # lint:ignore:140chars
Multiple checks can be ignored in one comment by listing them with whitespace separators
# lint:ignore:double_quoted_strings lint:ignore:slash_comments
$baz = "baz"
// my awesome comment
# lint:endignore
Telling puppet-lint to ignore certain problems won’t prevent them from being detected, they just won’t be displayed (or fixed) by default. If you want to see which problems puppet-lint is ignoring, you can add --show-ignored
to your puppet-lint invocation.
$ puppet-lint --show-ignored
foo/manifests/bar.pp - IGNORED: line has more than 140 characters on line 1
For the sake of your memory (and your coworkers), any text in your comment after lint:ignore:<check name>
will be considered the reason for ignoring the check and will be displayed when showing ignored problems.
$ puppet-lint --show-ignored
foo/manifests/bar.pp - IGNORED: line has more than 140 characters on line 1
there is a good reason for this