-
Notifications
You must be signed in to change notification settings - Fork 205
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
Syntax error on Pattern data type #833
Comments
I have observed the same issue. I'm using puppet-lint 2.3.6, as packaged (twice) in the Puppet Development Kit v1.7. I concur that the problem seems to be associated with patterns that extend across multiple lines, as is enabled by turning on the I encountered it with type definitions, just as reported above. The affected types were accepted by several different revisions of Puppet 1.5.x, and they appear to have worked as intended, but puppet-lint rejected them altogether as containing syntax errors. |
Looking at the code, puppet-lint appears universally to reject regular expressions containing newlines (not just in the declarations of Pattern types). It even has a unit test for that behavior. Ruby and therefore Puppet unconditionally accept newlines in patterns, however, whether the |
Modified the lexer to make it recognize regular expressions that contain newlines. Replaced a unit test that checked for the opposite behavior, and added a test for distinguishing between the division operator and a regex delimiter. Resolves rodjek#833
Update: I guess it's connected to
(?x)
, as this works fine if the pattern is put on a single line.Puppet-Lint chokes on the following type alias:
Running the validator works without complaint, as do the unit tests I wrote for this.
Puppet-Lint does complain:
Versions:
The text was updated successfully, but these errors were encountered: