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 use of semi-colons used to define multiple resources #547
Comments
Hrm, the good and bad at that link are the same. Regardless, I believe this guidance is out of date, as this is required for the new 'default' method. I will check with Puppet to see if it is correct before proceeding either way. |
The good/bad at that link are for the
bit. They don't have good/bad examples for
so I added an illustration here. |
You don't actually come across many people using this style, but I did in |
This spawned from me coding like the example @alexjfisher gave and no one liking it. Good: file { '/tmp/file1':
ensure => 'file',
mode => '0600',
}
file { '/tmp/file2':
ensure => 'file',
mode => '0644',
}
file { '/tmp/dir':
ensure => 'directory',
} Bad file {
'/tmp/file1':
ensure => 'file',
mode => '0600';
'/tmp/file2':
ensure => 'file',
mode => '0644';
'/tmp/dir':
ensure => 'directory';
} |
@rnelson0 what's the new default method you are speaking about? Could you please post a link? |
Given "Semicolons must not be used to declare multiple resources within a set of curly braces." in the current style guide, we should have a rule that enforces it. |
I opened https://tickets.puppetlabs.com/browse/DOCUMENT-584 to track this concern. |
I commented on DOCUMENT-584. The gist of that post is that the rule should be "semicolon separated multiple resource bodies should only be used in conjunction with a local default body" |
eg
The text was updated successfully, but these errors were encountered: