puppet-lint icon indicating copy to clipboard operation
puppet-lint copied to clipboard

Check for bare words outside of attribute values

Open npwalker opened this issue 6 years ago • 1 comments

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.

npwalker avatar Mar 12 '19 16:03 npwalker

It's very common for bare words to be used after include, require and contain. Any implementation should probably also allow this.

alexjfisher avatar Oct 04 '21 11:10 alexjfisher