Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp538020rwe; Fri, 14 Apr 2023 06:38:26 -0700 (PDT) X-Google-Smtp-Source: AKy350awz5Tue+arjHdIuDFHjFTkeskMTTqasvp3V6qYuUogMv0lOmtWIo3tgYWHxd1EUpXQVTHA X-Received: by 2002:a05:6a20:3c8c:b0:ec:843a:6388 with SMTP id b12-20020a056a203c8c00b000ec843a6388mr5644202pzj.26.1681479505877; Fri, 14 Apr 2023 06:38:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681479505; cv=none; d=google.com; s=arc-20160816; b=RvAs5iuKj+oD+XHEAI+nXSSHBRYYbWNnQ2oJyVeZrK88HdBpStrba/NJy34WCHV1yI qNwjqoUif0YDFX87G1wxO8Ker28OAcvpkyOTaHy9HR9k77UsBpSS7klaA7JqX+WR/T7O hm1Kgnsru0ksF5Oulnu9pV9QjDAcQrZhNdY7jYupfdWsaACBx/BLHloYmI5RbQimaRiC cnyp5xr/mCoPSyi/j4d26uqDNBdlLCNmOHlNlqXnggsaRwpZkn+t2Mv7u1NL06MR5fiJ ALLp5eQ3jwVBuznkxzaDEE6c1gph1e6e75kYr8bWyakmgXRGYrRBPH7+7rf7N8dqbfYr CxGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=bCMMqYXqdLzftYPyxap730NaR/BDwk+TJ6kmlEYvp48=; b=rcPC+2007r5+TLIChye5FR5eYaxwEE/5pN1JD/4zF0NiIUuJcB6hJvVl5P5qeGYOGO jBp3M9dMMkepfQ/eFzO57uQCgqc6rN3uBd1nXLtCMrPcOMD2DWii26lwNh8p+RlZ7R2p PKHcpY4CtgMTHVes7D8Z4AoGg7sbaauz9jXy9aVQuLH/zoMawb8XO9BMcAX/rPxHnvp5 NefN9WwRjgxrUrJuEWOC0biHRqBYUeFYTlPH5Lgdprp1RTlhOVZsR/O+Tj1aQBtn0AB6 Lc4yVP1v+XafQPlmEQzlKzuBeCJPdO+TehN4P31LaWnkkT0s9GFjp3+mDbxKyz9tEHer h3XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=YEt3CDL9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e15-20020a630f0f000000b0050fa328e128si4688147pgl.419.2023.04.14.06.38.14; Fri, 14 Apr 2023 06:38:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=YEt3CDL9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229775AbjDNNgh (ORCPT + 99 others); Fri, 14 Apr 2023 09:36:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbjDNNgf (ORCPT ); Fri, 14 Apr 2023 09:36:35 -0400 Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11AD383E3 for ; Fri, 14 Apr 2023 06:36:32 -0700 (PDT) Received: by mail-yb1-xb36.google.com with SMTP id g10so1984317ybu.8 for ; Fri, 14 Apr 2023 06:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681479391; x=1684071391; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bCMMqYXqdLzftYPyxap730NaR/BDwk+TJ6kmlEYvp48=; b=YEt3CDL9MSdSVh6XkAStD2cO5TGpHGncPbKV8aVwUs5fCzuGR9+SwHo4vlTeGp8mmo 9URlBi9ZyRZkkn5ycruLpDiuV41Me2mn/fMsEUo6vcLvkTnkZdMZYSC1LMpyiZ0K+BF8 ua84+5iWLzEwozDVYbjn5tI3TdSu+lzQ9FYcSjZ0REO721IihVzjhXDJPVbYeDHVXkyC Mf9bv41H96tEbGxXUIAqscfDZa0AoATkByTfn9ePFIKlItbhrCXzcZm7jsSVlByIXUo2 Wiv/6i/nwrtgxJlm1nu1637RHinpq2mNocQKhDUVmIb4Ht0fw0IITNmN1aKeanWvuVH2 HkgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681479391; x=1684071391; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bCMMqYXqdLzftYPyxap730NaR/BDwk+TJ6kmlEYvp48=; b=NC/4QqQ4oMeSwBiXZEunqih9N074BntbSX+rviLMEYCOU9BbTBMcjxspa+glPFVVD+ mKM8sDjWiQQqZYQDuIjRPbszFysjtemcNiFGhc5QVzwWlY71i6/A+6m7fZFlACir3d9J zBxJN3Oz7YnOSLDuphQ+7l4eDAFXtL0oe/TcYZTYzGyavs1D2dcSlgEUTkq6ThQT4rgS cNJoC9jdiVmhDl1GSMw5t/Hrr+y11UlLo+E/PgvqCQKubPFtXE0D5h6bM9GN2I2t1JRY 1hzG6wqhCkNd17bZnCAbcz0m+ftj1AYuNCGxOyK4e+kGTzYlh4dMWtdrQaKvdkcNmVdj eXvg== X-Gm-Message-State: AAQBX9eDkLgxoC2Bz1UsXwcdB1l+LuVwGyxM0GL16ugudWQxfRQgtO76 G04z0xokpM7UMNoQUJDNSTMbDOQRp/CaPRfec8I= X-Received: by 2002:a25:d6d8:0:b0:b8f:5680:7d99 with SMTP id n207-20020a25d6d8000000b00b8f56807d99mr3717296ybg.11.1681479391314; Fri, 14 Apr 2023 06:36:31 -0700 (PDT) MIME-Version: 1.0 References: <20230414101052.11012-1-ihuguet@redhat.com> In-Reply-To: <20230414101052.11012-1-ihuguet@redhat.com> From: Miguel Ojeda Date: Fri, 14 Apr 2023 15:36:19 +0200 Message-ID: Subject: Re: [PATCH v3] Add .editorconfig file for basic formatting To: =?UTF-8?B?w43DsWlnbyBIdWd1ZXQ=?= Cc: ojeda@kernel.org, masahiroy@kernel.org, jgg@nvidia.com, mic@digikod.net, danny@kdrag0n.dev, linux-kernel@vger.kernel.org, corbet@lwn.net, joe@perches.com, linux@rasmusvillemoes.dk, willy@infradead.org, Andrew Morton Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 14, 2023 at 12:11=E2=80=AFPM =C3=8D=C3=B1igo Huguet wrote: > > EditorConfig is a specification to define the most basic code formatting > stuff, and it's supported by many editors and IDEs, either directly or > via plugins, including VSCode/VSCodium, Vim, emacs and more. Thanks -- v3 looks much safer! To clarify the risks (it would be nice to detail these in the commit messag= e): - Did you sample files manually or did you automate the search (e.g. grepping for spaces/tabs, for LF, etc.) to verify the current rules match the files in the kernel tree? - Would it be possible to go further than grepping and apply the rules (e.g. trigger a "save") through the entire tree to see whether there would be spurious changes? If that comes out clean (or mostly clean), then we would be fairly confident this will not surprise developers (and it would be nice to have the script around for future updates of the `.editorconfig`). Perhaps EditorConfig provides a script to check this already? Otherwise perhaps it can be done with editorconfig-core-c or editorconfig-vim or directly scripting on a couple editors? - Are we sure the rules match the output of automated formatters we are using? (e.g. for Rust we enforce `rustfmt`, and thus we need to ensure the editor does not "fight" the formatter; otherwise developers may need to run the formatter more). Cc'ing Andrew since he applied originally the `.clang-format`. Cheers, Miguel