Closed danielparks closed 2 years ago
Updated the tests to work and added lengthy comments (maybe I shouldn’t wrap at 80 characters?).
I also updated the commit message in hope that it will help some future fool:
Tests that should fail
Note that two tests couldn’t be updated to a more common heredoc format to avoid failing.
It appears there is a problem with the way YARD parses parameters with defaults with a heredoc (YARD #779). There is a work-around for that issue in
PuppetStrings::Yard::Handlers::Ruby::Base
, but it can’t work in these cases because YARD doesn’t provide enough source to read the whole heredoc content.Given that these are tests of the Puppet 3 style functions, it’s probably not worth pursuing this issue.
As I said, I’m inclined to ignore this, even though it pains me deep inside.
@danielparks Might be worth rebasing this PR when you get five minutes. Then we can merge it.
💯 @danielparks 💯
This changes most heredocs to use the tilde syntax with variable interpolation off. It indents the contents of the heredoc along with the final symbol.
To maintain these changes, it enables
Layout/HeredocIndentation
andLayout/ClosingHeredocIndentation
in Rubocop.The tilde syntax smartly strips the indentation, and allows for different indention of the closing identifier:
This syntax was introduced in Ruby 2.3.0, so this will not pose compatibility problems.