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

puppet-lint issues scope warnings for array/hash access #291

Closed
bodgit opened this issue Aug 15, 2014 · 4 comments
Closed

puppet-lint issues scope warnings for array/hash access #291

bodgit opened this issue Aug 15, 2014 · 4 comments
Milestone

Comments

@bodgit
Copy link

bodgit commented Aug 15, 2014

The (> 0.3.2) puppet-lint seems to issue the "top-scope variable being used without an explicit namespace" warning for the following code:

$times = ip_to_cron($frequency)

cron { 'puppet':
    ...
    hour    => $times[0], # warning here
    minute  => $times[1], # warning here
}

Also for hash accesses as well.

@rodjek
Copy link
Owner

rodjek commented Aug 17, 2014

I'm unable to reproduce this with your example code on 0.3.2, 0.4.0.pre1, or master. Could you create a complete test file that reproduces this problem?

@dcarley
Copy link
Contributor

dcarley commented Aug 19, 2014

@rodjek I've created a failing test in that commit just referenced above.

@dcarley
Copy link
Contributor

dcarley commented Aug 20, 2014

Proposed a fix in #303

@rodjek rodjek closed this as completed in c59625e Aug 20, 2014
@rodjek rodjek added this to the 1.0.1 milestone Aug 20, 2014
@rodjek
Copy link
Owner

rodjek commented Aug 20, 2014

This has been fixed in 1.0.1

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

No branches or pull requests

3 participants