From: Dmitry Gutov <dgutov@yandex.ru>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 16996@debbugs.gnu.org, Bozhidar Batsov <bozhidar@batsov.com>
Subject: bug#16996: 24.3.50; [ruby-mode] Incorrect indentation for implicit hash arguments
Date: Sat, 29 May 2021 21:25:22 +0300 [thread overview]
Message-ID: <f114fc71-7a70-ed78-4ec6-7fb333daf18e@yandex.ru> (raw)
In-Reply-To: <87zgwd7wd5.fsf@gnus.org>
On 29.05.2021 11:55, Lars Ingebrigtsen wrote:
> The current indentation in Ruby here seems pretty natural to me, so I'm
> closing this bug report.
We should probably reopen it. It's not very urgent (as the bug creation
date will confirm), but I wanted to get around to this someday.
Bozhidar, could you confirm it's still needed (or good to have)?
I wanted to find some style guide or other solid description of this
style, but haven't managed to.
Ruby Style Guide strategically avoids this example, and
https://www.rubydoc.info/gems/rubocop/0.83.0/RuboCop/Cop/Layout/HashAlignment
and
https://www.rubydoc.info/gems/rubocop/0.83.0/RuboCop/Cop/Layout/ArgumentAlignment
do that too.
Despite that, I actually have to deal with this implicit recommendation
on a regular basis at work, because when both cops are enabled, Rubocop
will frown on
top(1, :a => 1,
:b => 2
and
top 1, a: 1,
b: 2
I do remember style like
top(1, :a => 1,
:b => 2)
being popular back in the day, but AFAICT a lot of editors now (like
Atom and VS Code) don't support it either.
next prev parent reply other threads:[~2021-05-29 18:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 10:53 bug#16996: 24.3.50; [ruby-mode] Incorrect indentation for implicit hash arguments Bozhidar Batsov
2014-03-12 15:18 ` Dmitry Gutov
2021-05-29 8:55 ` Lars Ingebrigtsen
2021-05-29 18:25 ` Dmitry Gutov [this message]
[not found] ` <CAM9Zgm0yd=scT4oEG38dNx6JeaogZ2Ge8VDhO8M3rrjYgoU8-w@mail.gmail.com>
2021-07-18 1:05 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f114fc71-7a70-ed78-4ec6-7fb333daf18e@yandex.ru \
--to=dgutov@yandex.ru \
--cc=16996@debbugs.gnu.org \
--cc=bozhidar@batsov.com \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).