You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# @summary A short summary of the purpose of this class
#
# A description of what this class does
#
# @example
# include test
class test {
$var = '/tmp/test'
if $::operatingsystemmajrelease == 'RedHat' {
file {"${test}":
ensure => file,
}
}
}
So tokens.index(token) ends up being nil. Note it is in the fix(problem) method and you have multiple problems there, so I think 2 plugins both fix the token stream. What probably happens is that one rewrites it to
file {$test:ensure => file,
}
And then the whitespace check wants to rewrite it to:
Describe the Bug
In some cases lint is unable to autofix the string containing only a variable lint check.
Expected Behavior
Lint will autofix
Steps to Reproduce
See code below
Environment
Additional Context
puppet-lint version: 4.0.0
ruby version: 3.2.2-p53
platform: x86_64-darwin21
file path: manifests/init.pp
file contents:
error:
The text was updated successfully, but these errors were encountered: