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
Would it be possible to be able to selectively disable checks from the puppet source itself? A possible example of syntax to do this could be something like...
$foo = "${bar}"; # convert ${bar} to a string @(only_variable_string)
The issue I'm starting to run into all over the place is Forge puppet modules that specifically require input to be strings. The only way to convert a non-string variable to a string value in Puppet (at least, Puppet before version 4.5) is by enclosing the variable reference in double-quotes; however, this causes puppet-lint to complain about a string containing only a variable. Since I don't want to disable all checks for strings containing only a variable, this means that at the moment I have to do hacks like:
$foo = "x${bar}"[1,-1] # convert ${bar} to a string and avoid the lint complaint
This would be also be generally useful for other corner cases where puppet lint incorrectly flags code for warnings or errors (such as the previous behavior regarding variables defined in future-parser lambda blocks).
The text was updated successfully, but these errors were encountered:
Oh - sorry I forgot to reply! Yes, control comments are exactly what I was looking for.
As a side note - for folks (like me) who don't (or didn't) know about puppet-lint.com, maybe a pointer to it in the top level README.md file would be useful :)
Would it be possible to be able to selectively disable checks from the puppet source itself? A possible example of syntax to do this could be something like...
The issue I'm starting to run into all over the place is Forge puppet modules that specifically require input to be strings. The only way to convert a non-string variable to a string value in Puppet (at least, Puppet before version 4.5) is by enclosing the variable reference in double-quotes; however, this causes puppet-lint to complain about a string containing only a variable. Since I don't want to disable all checks for strings containing only a variable, this means that at the moment I have to do hacks like:
This would be also be generally useful for other corner cases where puppet lint incorrectly flags code for warnings or errors (such as the previous behavior regarding variables defined in future-parser lambda blocks).
The text was updated successfully, but these errors were encountered: