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
It's probably in RuboCop but since I can't figure out what actually gets passed to rubocop (the --debug output doesn't trigger it), I'm making an issue here.
Any thoughs please?
The text was updated successfully, but these errors were encountered:
I don't know if writing code this way always does what you want, and I would advise against it. I think haml-lint is actually doing the right thing here given the quick investigation I've done.
Hi, I actually noticed the else problem with haml, and I obviously agree with your = 1 + counter-example, it's just that .. well, sometimes you really want to be able to do a multiline if, and the | haml operator doesn't seem to do the trick. But oh well, what can you do, back to rewriting.. :) I guess something like - tmp ||= subcondition might do the trick.
I do agree that there should be a linter since this is apparently not supported nor even mentioned in haml docs. Also, please note that code like - if foo ||without any subsequent - line passes haml-lint checks as well.
sds
changed the title
multiline if - [W] RuboCop: Syntax: unexpected token kEND
Add linter to detect scripts that should not be split over multiple lines
Mar 11, 2015
Hi,
if you have a multiline if statement in haml, for example:
haml-lint outputs a bogus
(In some cases it's
$end
instead ofkEND
.)It's probably in RuboCop but since I can't figure out what actually gets passed to rubocop (the --debug output doesn't trigger it), I'm making an issue here.
Any thoughs please?
The text was updated successfully, but these errors were encountered: