puppet-lint
puppet-lint copied to clipboard
Check for bare words outside of attribute values
Bare words are common for setting attribute values. However, if you simply forget a $ on a variable you get a bare word in a place you probably didn't want it.
https://puppet.com/docs/puppet/6.3/lang_data_string.html#reference-9253
$my_variable = 'test'
if my_variable != test {
fail('you forgot the $')
}
We should emit a warning for any bare words not on the right hand side of an attribute.
It's very common for bare words to be used after include, require and contain. Any implementation should probably also allow this.