mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Nick Desaulniers <ndesaulniers@google.com>
Cc: clang-built-linux <clang-built-linux@googlegroups.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] .clang-format: Remove conditional comments
Date: Wed, 04 Nov 2020 23:08:18 -0800	[thread overview]
Message-ID: <1418629172bac8fe75fee59f13e1192dd1ae5e4e.camel@perches.com> (raw)
In-Reply-To: <CANiq72m0Rwu78AVjt71Ym55E_xvk6SSC5ZpMoS+WEt=ri2MgNQ@mail.gmail.com>

On Thu, 2020-11-05 at 07:44 +0100, Miguel Ojeda wrote:
> There are a few important new features:

https://clang.llvm.org/docs/ClangFormatStyleOptions.html

>   - AlignConsecutiveMacros is probably one of the biggest one for the
> kernel that we were missing so far.

There's no control as to effective column nor sensible mechanism to
avoid extremely long indents with a single exceptional entry.

>   - IndentPPDirectives and

Some yes, mostly no.

AlignEscapedNewlines:

Generally the kernel uses column 72 but there's not real consistency.
clang-format doesn't have that option as far as I can tell.

> Then there are a few others that pertain to us too:
>   - SpaceBeforeSquareBrackets

no

>   - SpacesInConditionalStatement

no
 
>   - SpaceAfterLogicalNot

no

>   - SpaceInEmptyBlock

no

>   - IndentGotoLabels

no

> 
> Others are also worth checking to see if we can take advantage of them:
>   - IncludeBlocks (and configuring IncludeCategories etc.)

Might be worthwhile.  It's different by maintainer preference though.
Reverse Xmas tree is somewhat common in networking, (which I think is
silly, but DaveM likes it).  Some like alphabetic ordering, others
by order of include.

>   - StatementMacros

Kernel is not c++ so this is irrelevant for gcc macro statement expressions.

> Then there are others that are not related to us, but to be consistent
> we would explicitly set them in the file. Finally, for extra points,
> we could already document the new ones in LLVM 11 if any, for the
> future, but that is optional.
> 
> If no one is up for the task, I will eventually do it... :-)

Enjoy...


  reply	other threads:[~2020-11-05  7:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 18:29 Joe Perches
2020-11-03 21:33 ` Miguel Ojeda
2020-11-04  0:56   ` Joe Perches
2020-11-04  3:10     ` Miguel Ojeda
2020-11-04  3:15       ` Joe Perches
2020-11-04  3:57         ` Miguel Ojeda
2020-11-04  4:16           ` Joe Perches
2020-11-04  5:24             ` Miguel Ojeda
2020-11-04  1:08   ` Nick Desaulniers
2020-11-04  1:31     ` Joe Perches
2020-11-05  0:35       ` Nick Desaulniers
2020-11-05  6:44         ` Miguel Ojeda
2020-11-05  7:08           ` Joe Perches [this message]
2020-11-04  3:40     ` Miguel Ojeda
2020-11-05  0:33       ` Nick Desaulniers
2020-11-05  5:10         ` Miguel Ojeda
2020-11-04  1:11 ` Nick Desaulniers

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=1418629172bac8fe75fee59f13e1192dd1ae5e4e.camel@perches.com \
    --to=joe@perches.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ndesaulniers@google.com \
    /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

all inboxes | Powered by JetHome®