You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having multiple heredocs in one file causes an error. Seems fine with just one heredoc. I don't know if there are even any style rules for heredocs yet, but it executes fine on future parser so it would be good for it to at least quietly pass over them.
Example file:
class heredoc() {
warning @(END)
Multiline text.
Text
|- END
warning @(END)
More text
Hello
|- END
}
bin/puppet-lint heredoc.pp results in:
check_classes.rb:258:in `block (2 levels) in check': undefined method `line' for nil:NilClass (NoMethodError)
from /home/nick/code/puppet-lint/lib/puppet-lint/plugins/check_classes.rb:224:in `each'
from /home/nick/code/puppet-lint/lib/puppet-lint/plugins/check_classes.rb:224:in `block in check'
from /home/nick/code/puppet-lint/lib/puppet-lint/plugins/check_classes.rb:206:in `each'
from /home/nick/code/puppet-lint/lib/puppet-lint/plugins/check_classes.rb:206:in `check'
The text was updated successfully, but these errors were encountered:
It's only when using the pipe modifier (which strips the left hand margin) - could be getting mixed up with the future scope parsing for lambda parameters in pipes.
Just bumped into a similar problem in check_nodes.rb. Might be something better fixed in the parser in which case I'm out of my depth. In fact it's triggered by the word "node" in the heredoc content, so definitely think the parser will need to be made aware of heredoc to avoid it tripping on keywords in string content.
Having multiple heredocs in one file causes an error. Seems fine with just one heredoc. I don't know if there are even any style rules for heredocs yet, but it executes fine on future parser so it would be good for it to at least quietly pass over them.
Example file:
bin/puppet-lint heredoc.pp
results in:The text was updated successfully, but these errors were encountered: