[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2e3b15aea8645f38cea9442a4b6eb95f5b33eec6.camel@perches.com>
Date: Thu, 12 Sep 2019 15:15:06 -0700
From: Joe Perches <joe@...ches.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Jeff Moyer <jmoyer@...hat.com>,
Dan Williams <dan.j.williams@...el.com>,
linux-nvdimm <linux-nvdimm@...ts.01.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH 00/13] nvdimm: Use more common kernel coding style
On Thu, 2019-09-12 at 23:58 +0200, Miguel Ojeda wrote:
> On Thu, Sep 12, 2019 at 11:08 PM Joe Perches <joe@...ches.com> wrote:
> > Please name the major projects and then point to their
> > .clang-format equivalents.
> >
> > Also note the size/scope/complexity of the major projects.
>
> Mozilla, WebKit, LLVM and Microsoft. They have their style distributed
> with the official clang-format, not sure if they enforce it.
>
> Same for Chromium/Chrome, but it looks like they indeed enforce it:
thanks for that list.
> > I used the latest one, and quite a bit of the conversion
> > was unpleasant to read.
>
> It would be good to see particularly bad snippets to see if we can do
> something about them (and, if needed, try to improve clang-format to
> support whatever we need).
As I mentioned earlier, look at the __stringify conversion.
Also the C() blocks.
btw: emacs 'mark-whole-buffer indent-region',
the tool I used for each file in patch 1, also
made a mess of the C() block.
> Did you tweak the parameters with the new ones?
No. I used
$ clang-format --version
clang-format version 10.0.0 (git://github.com/llvm/llvm-project.git 305b961f64b75e73110e309341535f6d5a48ed72)
and the existing .clang_format from
next-20190904 35394d031b710e832849fca60d0f53b513f0c390
> I am preparing an RFC
> patch for an updated .clang-format configuration that improves quite a
> bit the results w.r.t. to the current one (and allows for some leeway
> on the developer's side, which helps prevent some cases too).
Well, one day no doubt an automated tool will be
more useful for the kernel. Hope you keep at it
and good luck.
> > Marking sections _no_auto_format_ isn't really a
> > good solution is it?
>
> I am thinking about special tables that are hand-crafted or very
> complex macros. For those, yes, I think it is a fine solution. That is
> why clang-format has that feature to begin with, and you can see an
> example in Mozilla's style guide which points here:
>
> https://github.com/mozilla/gecko-dev/blob/master/xpcom/io/nsEscape.cpp#L22
>
> Cheers,
> Miguel
Powered by blists - more mailing lists