The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@mellanox.com>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Andy Whitcroft <apw@canonical.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] clang-format: Set IndentWrappedFunctionNames false
Date: Wed, 6 Jun 2018 14:25:28 -0600	[thread overview]
Message-ID: <20180606202528.GX2233@mellanox.com> (raw)
In-Reply-To: <22cb30ea19ad4ab1b341836c5f672ba406cb2b4e.camel@perches.com>

On Wed, Jun 06, 2018 at 01:18:59PM -0700, Joe Perches wrote:
> On Wed, 2018-06-06 at 14:15 -0600, Jason Gunthorpe wrote:
> > The true option causes this indenting for functions:
> > 
> > static struct something_very_very_long *
> >     function(void *arg)
> > {
> > 
> > While a quick survey suggests that the usual Linux fallback is the GNU
> > style:
> > 
> > static struct something_very_very_long *
> > function(void *arg)
> > 
> []
> > AFAIK the above describes the more common choice in the code base?
> > 
> > Not sure who's tree this is supposed to go through.. Andrew I guess?
> 
> I believe so yes.
> 
> I expect there will be more refinements to .clang-formata
> as perhaps more people experiment with it too.
> 
> Acked-by: Joe Perches <joe@perches.com>

Thanks Joe,

I saw your note in the original mailing-list thread and just wanted to
say the way I use clang-format is editor based.

I have a hotkey that triggers clang-format to reformat the current
statement, or current hi-lighted region. If I don't like it, then
'undo' puts it all back for manual adjustment..

This way I am selective of where I apply it, and I find it is
something like 95% of the time good, IHMO.

Big time saver for wrapping long lines, moving code around (eg
indent,de-indent) and other mundane daily tasks.

Cheers,
Jason

  reply	other threads:[~2018-06-06 20:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06 20:15 [PATCH] clang-format: Set IndentWrappedFunctionNames false Jason Gunthorpe
2018-06-06 20:18 ` Joe Perches
2018-06-06 20:25   ` Jason Gunthorpe [this message]
2018-06-06 20:34     ` Joe Perches
2018-06-07 12:56     ` Miguel Ojeda
2018-06-07 12:43   ` Miguel Ojeda
2018-06-07 12:50 ` Miguel Ojeda

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180606202528.GX2233@mellanox.com \
    --to=jgg@mellanox.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=corbet@lwn.net \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=rdunlap@infradead.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox