-
Notifications
You must be signed in to change notification settings - Fork 206
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
Line numbers off after multi-line strings with variables #736
Comments
Example contrived syntax that shows line numbers are off:
Executed shows the indentation error:
But the actual error line is line 6 |
When the following is invoked with the invoked with the strict_indent plugin:
The errored output is:
with the complained about line being line 11, but actually it's complaining about line 12. When it does that, then the arrow_alignment checks start complaining about lines 13 and 14. After that any fix involves strict_indent and arrow_alignment complaining about the other plugin's fix. Implementing the fix in #737 makes this issue stop happening. |
#737 has been merged |
When parsing a multi-line strings with variables in them, the line numbers are incorrect. The line numbers being off causes the https://github.com/relud/puppet-lint-strict_indent-check to get lost and report non-existent errors.
There may be a smart way to change the strict_indent check to not get confused.
The line numbers appear to go wrong at https://github.com/rodjek/puppet-lint/blob/master/lib/puppet-lint/lexer.rb#L469 When the VARIABLE token is inserted, if it has a line number that doesn't reflect the previous changes to line_no in new_token() of the DQPRE entry.
The text was updated successfully, but these errors were encountered: