Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2572047rwd; Wed, 14 Jun 2023 04:57:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7xPwux8VmWF30whJRG7D3xsz92z2EBOF7MQ08oRkg6KNcepzJJSbrAxqHpXYCPHAzWo+g3 X-Received: by 2002:aa7:cf84:0:b0:518:7a51:7e97 with SMTP id z4-20020aa7cf84000000b005187a517e97mr3534246edx.36.1686743840856; Wed, 14 Jun 2023 04:57:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686743840; cv=none; d=google.com; s=arc-20160816; b=uRy3UTS47u8Jbw8ZnjqmWKPP3fhxgN5jZOGtELqUkxEG+K4DWOP+hFMhChJSHpQMRY CjXwSZK4oxBcli76sHJbinKDGZIcbEtEVA2a3S+HfNlPfn8ajcP5LQIkhXITGJg5lnRc NMAbfKaFcD8fRFCJKn+O1wbXC07gn/B1WUSP9zk9IqoHNzK0IeZPozetZYmeklFLoHVv 20mfYr5ByIYtO1L6Yg4YEZ1519w3bV7wd+qES211+aQuXU3FSaV582jwnl4a8xCHkp4d oSMtgPD2iXK96Utr3xvXC+s/e6u3Kf3KoAkPhWJbRsjUlnaYz7gwrrNZefNoEginvxVK HYGw== 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=CZ8YkYiRNyFpkA43Ht79MvS8YaGj3WYAc1zv2BWvzwE=; b=Y0ARVIiRld1Ale4+dzBpiKoaMFAxxQ77VCbXMYwPFqMhsWmbArEQhhffkZwjPpMKH7 px2mBGsD8LUFxzHeL4WdyLnEKjSjZIzjDNV14PsAUiFkrPFPy3aHDYEeYMzp4drpeQen uS6lqlTwkMmL66NWsmcIL8gtPRfa+OxTsyj7vev9hQF33D06it8Wvdc4cvZJegZOdFxI 9BYf1WUYHoEZ0HGuZ3oQOuv+1VE9kd3ta7mwwGLtxeoKBQvBn9D4mGFqAmazn7xLy4es GnmpAzOtc3mR41fr0I9aoZ6hlV252tBH9/6e4NafClP1+Mj7E/nR55CW+c5lzdJ53PuG Gw/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U+0WyhNn; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v20-20020a056402185400b005187aa71e5bsi1681413edy.273.2023.06.14.04.56.55; Wed, 14 Jun 2023 04:57:20 -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=@redhat.com header.s=mimecast20190719 header.b=U+0WyhNn; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234041AbjFNLfA (ORCPT + 99 others); Wed, 14 Jun 2023 07:35:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244070AbjFNLez (ORCPT ); Wed, 14 Jun 2023 07:34:55 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3DD910D5 for ; Wed, 14 Jun 2023 04:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686742447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CZ8YkYiRNyFpkA43Ht79MvS8YaGj3WYAc1zv2BWvzwE=; b=U+0WyhNnAZPnBoi7KmGpqRpi7tUoxRt3srEdNq3SdOQtvDJaQ0KADfmIMpKqauCoE9kx98 OYD9lWKLCDlIXb1qBHp9JN5ZMi1ojpx9K6lz8K3BxU84ccJfxjaQZJYwpZ5pu1gNhky6KO t3tKyPqq7h3Rg8j9Ax1NnHsb2UFBwyQ= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-59-mGhMnzAGOEOhXropsUQbfw-1; Wed, 14 Jun 2023 07:34:05 -0400 X-MC-Unique: mGhMnzAGOEOhXropsUQbfw-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2b1e6258204so4026791fa.3 for ; Wed, 14 Jun 2023 04:34:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686742444; x=1689334444; 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=CZ8YkYiRNyFpkA43Ht79MvS8YaGj3WYAc1zv2BWvzwE=; b=lAtCDSYhy413ymq6+LwR0/M5K2bgFRoPPocgrjDDwekIVZr3nU6X1hz7ztQNKuka77 jY3775f8B7D1jot8ghle2nyeVlS8iex7CPfPthzr65uYMYY9gOfOUPj+bZgtwwyqYa5u f6EDQ8p/+xT7vyGux4zNZ/AxCy4V6YgGsP7s/UOSpLZ8vq61/3BON9OaB3E7PxFOB+gs gIcttbcJHoKWJY48xQhbOmCq+up0KJWNKdLKohx6b/zHnp/LQsVagmVDCNeaiTEucM1O f5YsDge9+5S9s1az7NM/y5rMlCsnXd6f9YsZdTL1Znw31EnVg/oEU96kzbhUXJtE0rLM WZBA== X-Gm-Message-State: AC+VfDxCQfpYO4NnWcKph1XgreUmiZGa7mHEnx6L8XOPK9Lf9Ts0I+9N 1DoTB9X/5VNqvcURq7FqXD96ZMxtHYszEb4NejZXylegR0iW36nmpxDrGM1iZGJTkCVZk38IK1V 29vI8iXGy7Y41a9vv34xmsjctQJcucXK0wAkwAwZH X-Received: by 2002:a2e:87d9:0:b0:2b2:5d2:ce5f with SMTP id v25-20020a2e87d9000000b002b205d2ce5fmr6107203ljj.50.1686742444145; Wed, 14 Jun 2023 04:34:04 -0700 (PDT) X-Received: by 2002:a2e:87d9:0:b0:2b2:5d2:ce5f with SMTP id v25-20020a2e87d9000000b002b205d2ce5fmr6107197ljj.50.1686742443863; Wed, 14 Jun 2023 04:34:03 -0700 (PDT) MIME-Version: 1.0 References: <20230601075333.14021-1-ihuguet@redhat.com> <87sfb1oz13.fsf@meer.lwn.net> In-Reply-To: From: =?UTF-8?B?w43DsWlnbyBIdWd1ZXQ=?= Date: Wed, 14 Jun 2023 13:33:52 +0200 Message-ID: Subject: Re: [PATCH v4] Add .editorconfig file for basic formatting To: Miguel Ojeda Cc: Jonathan Corbet , ojeda@kernel.org, danny@kdrag0n.dev, masahiroy@kernel.org, jgg@nvidia.com, mic@digikod.net, linux-kernel@vger.kernel.org, joe@perches.com, linux@rasmusvillemoes.dk, willy@infradead.org, mailhol.vincent@wanadoo.fr 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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,WEIRD_QUOTING 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, Jun 9, 2023 at 12:49=E2=80=AFPM Miguel Ojeda wrote: > > On Fri, Jun 9, 2023 at 10:49=E2=80=AFAM =C3=8D=C3=B1igo Huguet wrote: > > > > This is a valid option, indeed, but In my opinion we are overlooking th= is. > > > > Adding an .editorconfig will not silently reconfigure the editors of > > everyone because for most editors you need to install a plugin to use > > it. In my opinion, that's enough "opt-in". Here is the list of editors > > that have built-in support, and those that need a plugin install. I > > don't think that those with built-in support are widely used for > > kernel development, and many of them allow to disable the feature. > > It is true that some of the big ones (Emacs, Vim, VS Code...) do not, > but e.g. NeoVim and Kate (`KTextEditor`) both seem to support it, and > those are used by some kernel developers. In particular, NeoVim says > it enables it by default, if I am reading correctly. > > But perhaps those two behave as we want. As I can see, NeoVim allows to disable it, which is good enough for me, but Kate doesn't. > > > I see this as the exact same case as adding a .clang-format file, as > > we already have. Some editors, either built-in or via plugin, > > automatically reformat code when this file is present. And it's far > > more "intrusive" than editorconfig. > > I do not recall any complaints about code getting reformatted > automatically -- which editors are you referring to? (i.e. that > natively reformat the code, in its default configuration). Maybe not in default configuration, but people might have it enabled in their editors anyway, so suddenly appearing a .clangformat in the repo could cause it. My point is that this is a very similar case. > In any case, it was a slightly more constrained case: `clang-format` > (and LLVM/Clang) needed to be installed with a new enough version, > which may not have been too common back then, and it ""only"" applied > to C code. > > Cheers, > Miguel > --=20 =C3=8D=C3=B1igo Huguet