From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63A9EC433E0 for ; Sat, 20 Mar 2021 05:25:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F03661943 for ; Sat, 20 Mar 2021 05:25:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229883AbhCTE4T (ORCPT ); Sat, 20 Mar 2021 00:56:19 -0400 Received: from smtprelay0183.hostedemail.com ([216.40.44.183]:44668 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229564AbhCTE4G (ORCPT ); Sat, 20 Mar 2021 00:56:06 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 203A6837F24D; Sat, 20 Mar 2021 04:56:05 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: iron37_620244d27755 X-Filterd-Recvd-Size: 2650 Received: from [192.168.1.159] (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf06.hostedemail.com (Postfix) with ESMTPA; Sat, 20 Mar 2021 04:56:03 +0000 (UTC) Message-ID: <03d462504887401ffbcdb58a392ad01923a2be7b.camel@perches.com> Subject: Re: [PATCH] clang-format: Update ColumnLimit From: Joe Perches To: Miguel Ojeda , Ansuel Smith Cc: Nathan Chancellor , Miguel Ojeda , Nick Desaulniers , linux-kernel , clang-built-linux Date: Fri, 19 Mar 2021 21:56:02 -0700 In-Reply-To: References: <20210319183714.8463-1-ansuelsmth@gmail.com> <20210319184234.jsudy6solmtrq6vz@archlinux-ax161> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2021-03-19 at 19:48 +0100, Miguel Ojeda wrote: > On Fri, Mar 19, 2021 at 7:45 PM Ansuel Smith 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.