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
Unhandled error case #691
Comments
Attached file since the tabs appear to make a difference. |
I've tracked this down to fix of the ensure_first_param check. The following condition must happen:
The first two lines before the 'foo' resource are lines with a single space on them. The two spaces are critical to cause this failure. When puppet-lint removes those spaces (tokens are deleted, I suspect), then the value of the start attribute of the resources hash for the problem resource ( The contents of resource_indexs could be cached from a request before the token was removed, so the contents will be wrong if the contents of the token array is changed. Changing
|
Well, that reduces performance considerably. Can the delete method for the token array be overridden to also set the resource_indexes to nil? Any other way to trigger resource_indexes to regenerate? |
I also had this issue but it was caused by having a training whitespace after my Class chains:
|
I suspect the methods provided in #694 expanded to reset resource_indexes (and others) to nil when tokens are added or removed would resolve this issue. |
Looks like it does. Thanks for following up. |
I've been attempting to reduce a manifest to report a case of puppet-lint --fix mangling a file. In doing so, I ended up with this:
puppet-lint version: 2.2.1
ruby version: 2.0.0-p648
platform: universal.x86_64-darwin16
file path: init.pp
file contents:
error:
The text was updated successfully, but these errors were encountered: