-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix some Puppet Lint errors #840
Conversation
i'm not really happy with the |
Why and do you see any better option? |
frankly, i'd ignore those for now. |
But it fixes the Puppet Lint errors... Imagine the following scenario: Someones downloading this module from the forge and add it to their internal SVN repository. The SVN repository is configured with an pre-commit hook which blocks the commit if the Puppet Lint test fails. |
if ! defined(Apache::Listen["${listen_addr_port}"]) and $listen_addr_port and $ensure == 'present' { | ||
::apache::listen { "${listen_addr_port}": } | ||
if ! defined(Apache::Listen[$listen_addr_port]) and $listen_addr_port and $ensure == 'present' { | ||
::apache::listen { $listen_addr_port: } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to be quoted because it will break with the future parser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh thats interesting, because the tests passed. So i guess there are some future parser tests missing. Will fix this soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added travis tests with future parser for Puppet 3.5 with Ruby 1.9.3 and 2.0.0
Rather than add the lint exception could you just use double-quoted strings with the |
I wasn't aware that the style guide allows this. From my understanding, a double quoted string is only allowed when variable are included. But my tests showed that i was wrong... :( So its fixed as requested :) |
please remove the travis tests, they should be added to https://github.com/puppetlabs/modulesync |
Done. |
@@ -76,7 +76,7 @@ | |||
} | |||
} | |||
|
|||
file { "${_loadfile_name}": | |||
file { $_loadfile_name: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm still confuzzled about what @mhaskel said: how come it doesn't need quoting here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@igalic Since that's just a bare variable (and isn't going to be a number) it doesn't need to be quoted.
Fix some Puppet Lint errors
Currently when specifying `docker_users` every user is both created and added to the docker group. If `create_user` is false then the users are presumed to exist via another method outside this module and will only be added to the docker group. Fixes puppetlabs#840
As mention in the subject, i've fixed some Puppet lint errors.
Regards,
Matthias