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

Variables in each incorrectly idenentified as top scope. #249

Closed
dforste opened this issue Jan 31, 2014 · 1 comment · Fixed by #293
Closed

Variables in each incorrectly idenentified as top scope. #249

dforste opened this issue Jan 31, 2014 · 1 comment · Fixed by #293
Milestone

Comments

@dforste
Copy link

dforste commented Jan 31, 2014

In the following piece of puppet code

  if $groups {
    $all_groups.each |$my_group, $group_gid| {
      if !defined( Group[$my_group] ){
        if $my_group in $groups {
          group {$my_group:
            ensure => present,
            gid    => $group_gid,
          }
        }
      }
    }
  }

$my_group and $group_gid have the following warning:
WARNING: top-scope variable being used without an explicit namespace on line ...

@rodjek
Copy link
Owner

rodjek commented Mar 4, 2014

I'm holding off adding support for the future parser functionality until it becomes stable. Once it has, I'll come back to this issue

tayzlor added a commit to tayzlor/puppet-lint that referenced this issue Jun 24, 2014
rodjek added a commit that referenced this issue Aug 17, 2014
Adds support for future parser loop local scope blocks that define variables
to the variable_scope check.

Closes #264
Closes #258
Closes #249

/cc #271
@rodjek rodjek added this to the 1.0.0 milestone Aug 17, 2014
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

Successfully merging a pull request may close this issue.

2 participants