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
The repair (--fix) for only_variable_string changes the behavior of code when implicit stringification of non-primitive types is used.
Expected Behavior
When Puppet code casts a variable to a string by enclosing it in quotes, puppet-lint should only decide those quotes are unnecessary if removing them doesn't risk removing implicit stringification/cast behavior.
Steps to Reproduce
Run the following Puppet code through puppet-lint:
$version = SemVer('3.12.4')
notify { "$version":}
Observe that puppet-lint reformats the code to be notify { $version:} which fails to compile since $version is not a string and names can only be strings.
Environment
Version puppet-lint (4.2.4)
MacOS 14, Ruby 3.3.3.
The text was updated successfully, but these errors were encountered:
Describe the Bug
The repair (
--fix
) foronly_variable_string
changes the behavior of code when implicit stringification of non-primitive types is used.Expected Behavior
When Puppet code casts a variable to a string by enclosing it in quotes, puppet-lint should only decide those quotes are unnecessary if removing them doesn't risk removing implicit stringification/cast behavior.
Steps to Reproduce
Run the following Puppet code through puppet-lint:
Observe that puppet-lint reformats the code to be
notify { $version:}
which fails to compile since$version
is not a string and names can only be strings.Environment
puppet-lint (4.2.4)
The text was updated successfully, but these errors were encountered: