Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for bare words outside of attribute values #856

Open
npwalker opened this issue Mar 12, 2019 · 1 comment
Open

Check for bare words outside of attribute values #856

npwalker opened this issue Mar 12, 2019 · 1 comment

Comments

@npwalker
Copy link

npwalker commented Mar 12, 2019

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.

@alexjfisher
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants