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
Be clear, concise and precise in your description of the problem.
Open an issue with a descriptive title and a summary in grammatically correct,
complete sentences.
Use the template below when reporting bugs. Please, make sure that
you're running the latest stable RuboCop and that the problem you're reporting
hasn't been reported (and potentially fixed) already.
Before filing the ticket you should replace all text above the horizontal
rule with your own words.
Similar to the examples in #7378, I am seeing an unexpected offense when using heredoc with a guard clause. I think this might be related to #7796.
Expected behavior
Describe here how you expected RuboCop to behave in this particular situation.
No offense registered in this example:
def foo
puts(<<~END.squish) and return unless guard?
A multiline message
that will be squished.
END
return_value
end
Actual behavior
Describe here what actually happened.
Please use rubocop --debug when pasting rubocop output as it contains additional information.
The above example code produces this offense:
def foo
puts(<<~END.squish) and return unless guard?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Add empty line after guard clause.
A multiline message
that will be squished.
END
return_value
end
unless I start my heredoc with a blank line, e.g.:
def foo
puts(<<~END.squish) and return unless guard?
A multiline message
that will be squished.
END
return_value
end
Steps to reproduce the problem
This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.
RuboCop version
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler.
If you see extension cop versions (e.g. rubocop-performance, rubocop-rspec, and others)
output by rubocop -V, include them as well. Here's an example:
Be clear, concise and precise in your description of the problem.
Open an issue with a descriptive title and a summary in grammatically correct,
complete sentences.
Use the template below when reporting bugs. Please, make sure that
you're running the latest stable RuboCop and that the problem you're reporting
hasn't been reported (and potentially fixed) already.
Before filing the ticket you should replace all text above the horizontal
rule with your own words.
Similar to the examples in #7378, I am seeing an unexpected offense when using heredoc with a guard clause. I think this might be related to #7796.
Expected behavior
Describe here how you expected RuboCop to behave in this particular situation.
No offense registered in this example:
Actual behavior
Describe here what actually happened.
Please use
rubocop --debug
when pasting rubocop output as it contains additional information.The above example code produces this offense:
unless I start my heredoc with a blank line, e.g.:
Steps to reproduce the problem
This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.
RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler.If you see extension cop versions (e.g.
rubocop-performance
,rubocop-rspec
, and others)output by
rubocop -V
, include them as well. Here's an example:The text was updated successfully, but these errors were encountered: