Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2337031ybt; Sun, 21 Jun 2020 17:06:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4320OCXBLyVuppOqrPbxSyk2TH2yyWM20ioHiYL/3sjXApoSrxay3jbi9OHUwE7S/cA6V X-Received: by 2002:a50:d790:: with SMTP id w16mr13974651edi.231.1592784369865; Sun, 21 Jun 2020 17:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592784369; cv=none; d=google.com; s=arc-20160816; b=WDtk9yCDkWx07KV9Ocd3UnKyXKsvWjEqsHKl7VasmxXh8njIxM4XYoelV0q4vdXAzP lvMMusOOP0wA6uevd3HjEDFFM1n9U/J6TGlqc/y31dPJXRptQxhFlPeWfUy0uRLV/Qac bpur0ry7H/aWuoZ6en7dRkMhrGof6iQXUuJLtsJ4cA80VuKUkaLziQV3cWyU1NzO6z/i GMj7sw/M5BLmQHfQ2oWuRzAfkEejIdPNAQvM8yedNmfUIbBbamhNnogFQPwjwhxFkr07 pbhxEgW6GBw/qC57ROEuVKzPohE6/OPdjqrk3L9U5VhjE2GzqaK6SwBPWq3d/3hKVKxK khNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8iQjccibNsODBxIPRVwtnty0pnVq+FPlTnqtaVf/zvo=; b=EEwF9AzcA9h8+pbc6nJoyaU/i5F+o2idcBmtBlaKlW7oYcwBJxSnZ3fHEo2M24LoAR JDiuPKXvyKhqNausXF3FYzTdXYtqYPilMsLwV+wdNbD2uPZG191gzXJf5yFRnUs5kKEw ewVXNp3nw3QFGvEMmclPRwLyGI4GmMmGDyR3rNdOwgBQsn2fZIk4xefiMqB1u1QxZ7CS yxLo3wCs8FZYIDWxa3wkY9ZzxUuxCkZB+YvMXN89Yk4J00rtKUqmtZqJ28G5zomjJci6 RpdOTqLu8n7gqZtcRJRosrc7UxQ8XYkzM396gizZHhBmN7Q0GUfrAD9JKofgVMs9V/lx tPOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gWkqkt7i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z4si8366498eju.219.2020.06.21.17.05.44; Sun, 21 Jun 2020 17:06:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gWkqkt7i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730940AbgFVADp (ORCPT + 99 others); Sun, 21 Jun 2020 20:03:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726463AbgFVADp (ORCPT ); Sun, 21 Jun 2020 20:03:45 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A792DC061794 for ; Sun, 21 Jun 2020 17:03:44 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id i3so17280013ljg.3 for ; Sun, 21 Jun 2020 17:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8iQjccibNsODBxIPRVwtnty0pnVq+FPlTnqtaVf/zvo=; b=gWkqkt7iFu2e/U9U61du1Nn2Ytp5xdzZ0egK+HCF6urHHSXmJhOAdLTP7kJZPhaJI0 srpDhJl0eDusw4obCJo9U4nOuXCzuTaoYSi2VOMHXH5IOnNUNnWYDJoFCSxuOuI7fCRk A68KzOZYcAZQCdtWZHOj/XGZTdwTSASqNXKKmZY0u9SvGKqVujGF2+OKAaPVQEP9bGbi 4oQ7tpdwSa3YwBRumsesYU+VuGJpeTzHaLx8+8m+tcdTysFPUjZwaGPWpKiizzThMFh0 zWxE/4IvomBtLpCn7smxRTnqKlA2+/9ZLQXuKoQSbiDMOvDpBTHxeUo8SCporcE2N9aX fU8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8iQjccibNsODBxIPRVwtnty0pnVq+FPlTnqtaVf/zvo=; b=K4d6YMfLiefPWkIPz39eHiKP0yu16D0cJMhafoASnL87EQ3Rtl770YCML7x3Q24tLc PYbWDQ4+Lz1fgJu5IK4cBWZPbh9lFLVdqjcBeZkBIzuXjpXuRoZwCILmhgGWOy6bXrzh vrr7Z+qBZZtTf1xVhI26kc7o8z9i+AyO9ndGKP5c2+wCkB0jt3SZmVOorkOmTNxTl1Ti viMCwgiMVtu1xunH94Wok1z72wrgINUsbwVDpCVz0n6IiKV+GPS+viBgfsmIms/tLLhC fPMsRp2FgSdBCShk2Bsfxj7YicVuMTo6FPciv1BuNjsJ+OoBRHn8NlrF/D0ueUEl0JRO pJ/g== X-Gm-Message-State: AOAM530mPobVjCfLDJ9MezkxuDiikYh9bznK3OrXyuJo8J/2Kuln8GWI 0FGbDcY8ldwnMd0pzmEYOyiDfhldmnFCv3i5UCE= X-Received: by 2002:a2e:a544:: with SMTP id e4mr7716310ljn.264.1592784223211; Sun, 21 Jun 2020 17:03:43 -0700 (PDT) MIME-Version: 1.0 References: <20200610125147.2782142-1-christian.brauner@ubuntu.com> <4c6f8d63817cbc51765fd0b3046f81dccbd17ec7.camel@perches.com> <42da4b47dd3aaee77e65550df30e548dd23580cd.camel@perches.com> In-Reply-To: <42da4b47dd3aaee77e65550df30e548dd23580cd.camel@perches.com> From: Miguel Ojeda Date: Mon, 22 Jun 2020 02:03:32 +0200 Message-ID: Subject: Re: [PATCH] .clang-format: update column limit To: Joe Perches Cc: Christian Brauner , linux-kernel , clang-built-linux , Linus Torvalds Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Joe, I didn't forget about this -- I was playing the other day with `ColumnLimit: 0` and the new options up to LLVM 11 to see what we could do... See below. On Thu, Jun 11, 2020 at 9:26 PM Joe Perches wrote: > > Hey again Miguel: > > A little script and some statistics: > > Today about 6% of all code lines are > 80 columns > > Oddities like the ~3% of all lines with 113 and 121 columns > are machine generated. > > So realistically, < 3% of code is > 80 columns. The data you show is very useful, thanks! Of course, the current set of lines tends to be < 80 columns given the previous strongly preferred limit, but I would expect that % to grow in the future. By the way, the 20% figure I mentioned was w.r.t. the previous set of lines that were already over 80 columns (not w.r.t. the total set). Regarding the changes: `ColumnLimit: 0` could be a good compromise (which makes `clang-format` respect as much as possible the current line breaks) to let developers have more leeway. They would still get warnings from your `checkpatch` etc. On the other hand, making formatting dependent on the previous state is not something I am a fan of, particularly for long-term efforts to move to `clang-format` "completely". I guess users of `clang-format` should speak up (w.r.t. `ColumnLimit: 100`, `ColumnLimit: 0` or no change). At the end of the day, this is still just a tool and not enforced, and they can still override it, so if people start submitting code with 200-wide lines, well, they still can :-) Otherwise, let's leave it as it is for the moment and see what is the output of the script in, say, a year. Cheers, Miguel