-
Notifications
You must be signed in to change notification settings - Fork 208
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
Match function breaks puppet-lint #645
Comments
I can't replicate this:
Can you define "break" in this case and maybe add some output of what you're seeing? It could also be that the breakage only occurs when inside some other markers. Can you provide the whole file, or the smallest segment that you can verify replicates for you? |
Ok... here is the smallest snippet I got. Sorry I didn't include it before. Just commenting out that line cause things to break in my full code. Anyway...
|
It's not the match itself but the colons. Replace them with almost any other character and it works fine. I believe it's due to this code which assumes colons precede a resource declaration. It then tries to parse the following tokens as such and eventually hits a nil one, giving:
|
The following line of code will break puppet-lint.
$some_var = $other_var.match(/([\w\.]+(:\d+)?(\/\w+)?)(:(\w+))?/)
I am running ruby version 2.3.3.
I am running puppet-lint version 2.1.1.
This is the second time I am entering this issue. See #641
I just learned the escaped slash gets dropped on submission without blocking it as code. (Which I did this time)
That is why the parser wouldn't validate.
Bryan
The text was updated successfully, but these errors were encountered: