[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <03d462504887401ffbcdb58a392ad01923a2be7b.camel@perches.com>
Date: Fri, 19 Mar 2021 21:56:02 -0700
From: Joe Perches <joe@...ches.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
Ansuel Smith <ansuelsmth@...il.com>
Cc: Nathan Chancellor <nathan@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] clang-format: Update ColumnLimit
On Fri, 2021-03-19 at 19:48 +0100, Miguel Ojeda wrote:
> On Fri, Mar 19, 2021 at 7:45 PM Ansuel Smith <ansuelsmth@...il.com> wrote:
> >
> > Sorry, didn't notice that. Considering that checkpatch complains and
> > some reviewers actually state that 100 is the new limit, I think it's
> > time to update the file.
>
> IIUC, 80 is still the soft limit, but 100 is now the hard limit.
80 columns is still the strongly preferred limit.
>From coding-style.rst:
-------------------------------
The preferred limit on the length of a single line is 80 columns.
Statements longer than 80 columns should be broken into sensible chunks,
unless exceeding 80 columns significantly increases readability and does
not hide information.
-------------------------------
IMO: clang-format is mechanical and, like checkpatch, doesn't have much
'taste'.
Ideally, 100 columns would only be used when long length identifiers
exist with some mechanism that determines statement complexity.
Today it's fairly easy to go beyond 80 columns even if a statement
is similar to
a = b + c;
when identifier lengths are relatively long.
There are many existing 25+ character length identifiers, so the trivial
statement above if used with all identifiers of 25 characters or more
exceeds 80 columns.
So for some things, clang-format (and checkpatch) should allow > 80 column
lines for trivial statements like the above.
It's not a trivial implementation problem though.
Powered by blists - more mailing lists