GNU bug report logs -
#60186
29.0.60; ruby-mode indentation of multi-line expressions
Previous Next
Reported by: Aaron Jensen <aaronjensen <at> gmail.com>
Date: Mon, 19 Dec 2022 02:55:02 UTC
Severity: normal
Found in version 29.0.60
Fixed in version 29.1
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Follow-up to bug#60110
I prefer rather simplictic indentation for Ruby (and this appears to be
pretty common from codebases I've seen). Essentially, the rule is: If an
expression continues on another line, indent it once.
Current:
some_variable = some_object.
some_method
Desired:
some_variable = some_object.
some_method
Current:
some_variable = some_number + some_other_number *
some_third_number + some_fourth_number -
some_fifth_number
Desired:
some_variable = some_number + some_other_number *
some_third_number + some_fourth_number -
some_fifth_number
I don't know if this last one is related or not, but it follows the same
rule plus the rule about blocks. Everything about the continuation of
the expression is indented once. The contents of the block are indented
once more. The end should line up with the line that opened the block.
Current:
some_variable = some_array.
map do |x|
x + 1
end
Desired:
some_variable = some_array.
map do |x|
x + 1
end
This bug report was last modified 2 years and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.