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

False positive on when using a method on a variable #937

Open
b4ldr opened this issue Feb 11, 2021 · 0 comments
Open

False positive on when using a method on a variable #937

b4ldr opened this issue Feb 11, 2021 · 0 comments

Comments

@b4ldr
Copy link

b4ldr commented Feb 11, 2021

I noticed the following code triggers WARNING: unquoted resource title on line 3

$foo = '/tmp/file.conf'
notice($foo.dirname)
file{$foo.dirname:}
$ puppet apply ~/puppet_tests/puppet-lint_issue.pp                                                   
Notice: Scope(Class[main]): /tmp
Notice: Compiled catalog for desktop.home.arpa in environment production in 0.01 seconds
Notice: Applied catalog in 0.01 seconds
$ /usr/local/bin/puppet-lint -v  
puppet-lint 2.4.2
$ /usr/local/bin/puppet-lint ~/puppet_tests/puppet-lint_issue.p
WARNING: unquoted resource title on line 3

The following code does pass puppet-lint

$foo = '/tmp/file.conf'
notice($foo.dirname)
file{$foo.dirname():}
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

1 participant