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

String containing escape char (and no var) incorrectly flagged #26

Closed
phrawzty opened this issue Sep 9, 2011 · 1 comment
Closed

String containing escape char (and no var) incorrectly flagged #26

phrawzty opened this issue Sep 9, 2011 · 1 comment

Comments

@phrawzty
Copy link

phrawzty commented Sep 9, 2011

Hello again,

Consider :

class t {
    $alpha = 'foo\n'
    $delta = "bar\n"               # line 3
}

Will result in :
WARNING: double quoted string containing no variables on line 3

I've never used the Puppet Lexer, so I'm totally in the dark as to whether it can be leveraged to deal with this or not; once I get a chance to look at it I'll submit a patch, but if you have a solution, then go for it. ;)

@rodjek
Copy link
Owner

rodjek commented Sep 9, 2011

Yeah, this is a use case overlooked by the style guide, but still valid. It's an easy fix, I'll take care of it in a bit.

On 09/09/2011, at 8:48 PM, danreply@reply.github.com wrote:

Hello again,

Consider :

class t {
   $alpha = 'foo\n'
   $delta = "bar\n"               # line 3
}

Will result in :
WARNING: double quoted string containing no variables on line 3

I've never used the Puppet Lexer, so I'm totally in the dark as to whether it can be leveraged to deal with this or not; once I get a chance to look at it I'll submit a patch, but if you have a solution, then go for it. ;)

Reply to this email directly or view it on GitHub:
#26

@rodjek rodjek closed this as completed in 5c2ea64 Sep 9, 2011
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

2 participants