GNU bug report logs - #16182
24.3.50; ruby-mode: Indentation style of multiline literals with hanging open paren inside other parens

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Wed, 18 Dec 2013 03:56:02 UTC

Severity: minor

Found in version 24.3.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 16182 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 16182 <at> debbugs.gnu.org
Subject: Re: bug#16182: 24.3.50;
 ruby-mode: Indentation style of multiline literals with hanging open
 paren inside other parens
Date: Wed, 18 Dec 2013 07:42:27 -0500
>   Status.create!({
>     user: current_user,
>     text: params[:status]
>   })

This looks fine.

> https://github.com/intridea/grape/blob/master/lib/grape/endpoint.rb#L79

>   methods.each do |method|
>     route_set.add_route(self, {
>       path_info: route.route_compiled,
>       request_method: method,
>     }, route_info: route)
>   end

But this looks confusing to me.  If (as a coder) I wanted to keep the
code "not too deeply indented", I'd use something like:

   methods.each do |method|
     route_set.add_route(
       self,
       { path_info: route.route_compiled,
         request_method: method, },
       route_info: route)
   end

But that's just me (and I haven't checked to see if the current
indenter would get this right).


        Stefan




This bug report was last modified 11 years and 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.