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

Match function breaks puppet-lint #641

Closed
bryanjbelanger opened this issue Feb 24, 2017 · 2 comments
Closed

Match function breaks puppet-lint #641

bryanjbelanger opened this issue Feb 24, 2017 · 2 comments

Comments

@bryanjbelanger
Copy link

The following line of code will break puppet-lint.

$some_var = $other_var.match(/([\w.]+(:\d+)?(/\w+)?)(:(\w+))?/)

Thanks

Bryan

@rodjek
Copy link
Owner

rodjek commented Feb 24, 2017

@bryanjbelanger I'm not able to reproduce this locally. Can you please update the issue to include the error you're getting, which version of puppet-lint, and which version of Ruby you're using?

@rnelson0
Copy link
Collaborator

$ puppet parser validate 641.pp
Error: Could not parse for environment production: end pattern with unmatched parenthesis: /([\w.]+(:\d+)?(/

This is not valid puppet syntax and puppet-lint should only be used on valid files. The 3.x branch will be adding a pre-check for this, see #586:

$ be puppet-lint 641.pp
641.pp: ERROR: cannot be validated by `puppet parser validate`.

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

No branches or pull requests

3 participants