-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add Style/HeredocEscape
#580
base: master
Are you sure you want to change the base?
Add Style/HeredocEscape
#580
Conversation
103518b
to
f6268cb
Compare
f6268cb
to
5134398
Compare
|
||
def test(source, node : Crystal::StringInterpolation) | ||
return unless (code = node_source(node, source.lines)) && code.starts_with?("<<-") | ||
# Heredocs without interpolation are always size 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment contradicts the final test case:
it "fails if an escaped heredoc doesn't contain interpolation"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That testcase is checking if you have an escaped heredoc start that's unnecessary (by not having #{}
or escape sequences)
5134398
to
28ddd8e
Compare
Closes #565