Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1779344rwd; Fri, 9 Jun 2023 01:55:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5vSTqDI4MNzq0pfIDS5rMCqN4TPv24XRvaEQhNx4rcu8kRGtUWLp8c1IoM+S1JLDNM1ewA X-Received: by 2002:a05:6a20:7350:b0:10e:43e:e223 with SMTP id v16-20020a056a20735000b0010e043ee223mr577380pzc.1.1686300913427; Fri, 09 Jun 2023 01:55:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686300913; cv=none; d=google.com; s=arc-20160816; b=eMks2VBIOGW3SFgop1xEI06mdbqnQAUWMkHhfaCwyx+FhvFzK87RtDuc2NGFIDzOwJ Hwqn/d6KnYVOlXhC4hDkLZfQ0PER0vrLe80JGIYywgB0PXN0bu8/6z5WAvTcbqiYlKqu 3OKIeSHESfcw4DIsr1U5ywlVC+t6RI9A1dhAbPlG20TDuSqgezsWewv+R7u4/0ZrvamJ ydTBcnt3oV1jbsbnVTwZIFMtWv+KmTTk9HILYqctBpOD4Zry4/ubPl+g8PiEG003t8lO OTJxx81nrHB8VCYFj9h8CUHkgkMKatwPQ1ShWbo5EEkl0Lj8RnYTqJ2iKgp/TJteI0KO aOsQ== 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=PUwIKYQbWiICJqD4Rq9YjSeC0WyuaQsDDkRv9B8gaVA=; b=vE+redKwMiNErRyL1GJ2OZMGr68UDH/a9m6jwW5Jls4nWxjO4drdMB5fTSpES1Y84b ZUmvDSmzLF5xmdV515h/8qbe/f53Lkxwi7BxTn/+2EanSESGTtjIOJPdwpsgNwUFGikt atXPNlWHDXUu4x8YRpgb+CavOZnQyAOqAyBNQYi0LzOJqpxPPtwsDO8uZRcvmqVu/WFf 5xd1ozJPaOJEbhwEKXmdd+Js4m7LMKXBlGC5zxojq+Z814lMQkR7LlLHRZhx5Wy2DXaL js0t05GJ83ShITiy0AsUwfBj0qNf5OLJsYUDoIcfDONXY4z9VpA4fiEJ85nDL9fmau0v SuwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MZAudQ+f; 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 i8-20020a170902c94800b001b22df619e3si2419985pla.563.2023.06.09.01.54.41; Fri, 09 Jun 2023 01:55:13 -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=MZAudQ+f; 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 S239068AbjFIIw0 (ORCPT + 99 others); Fri, 9 Jun 2023 04:52:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241041AbjFIIv5 (ORCPT ); Fri, 9 Jun 2023 04:51:57 -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 7EE3BE2 for ; Fri, 9 Jun 2023 01:51:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686300664; 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=PUwIKYQbWiICJqD4Rq9YjSeC0WyuaQsDDkRv9B8gaVA=; b=MZAudQ+fIcuXAoOfx+E2AT9sMnnNUfRzzel2zwuz2R6CS4lP1BMMzRrgdRR6JFNCmmF/NR GYrUtzEGOtZQ5n3aKonKnQ/7JbpjoOkWBxZpzArOOfhycOb+qFej2EozHR3Xwg8hTcMJ8x 7lnsxI+6k1RktbVSz5QBwdo9TiSyUwc= 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-591-OLuHDa9JOt-EaHYELT6CXA-1; Fri, 09 Jun 2023 04:51:03 -0400 X-MC-Unique: OLuHDa9JOt-EaHYELT6CXA-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2b1a7e31de7so8745671fa.1 for ; Fri, 09 Jun 2023 01:51:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686300662; x=1688892662; 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=PUwIKYQbWiICJqD4Rq9YjSeC0WyuaQsDDkRv9B8gaVA=; b=KTBsAm8sG4bCimJWYDThhvQ5klvFzxrw2z50vlH5hC5Ewe6hqfdk+WI9QMiMTQ3wG8 gkR0sF2s5nE6wsRwurgvXTdABWD7zC+HhLCRBbjyuWr8RB1fMjUwfb+sPgftpqQ+5ppf GnYDr4+9V1BySsp6t+Hlw7DpOXbJ7H/+hop2phJ3EWaWjhCSde7O4dI0x3TyC+p3Mwp2 Qwb5dqyi2R7SBh2O27a3U/cFDBu6kH5lUxP1gUswizKhMyhAr31FHfRfvXVPJNcVEDJO x/6skHtX4+ryQWMG60EbT5MSI3HKqn2cy3/ug704DeMuNAZ9bjWBKnY9ugreJeduLB0R oLwg== X-Gm-Message-State: AC+VfDxspxtf4OOOu5oNUc48+EL34wWbxLDofmImpeqAKQedKPKwiB/n UdRZMAHp5woE1YLahpB/iuaSqgvKeG12W+kZ7ocgIJ+OYm/5lsfxJOqBNAUdTp1fo/cJaloSsJq L38DGE7W2ouhF0PGf7cCnl6yXltDO9kAnDRCdJX6S X-Received: by 2002:a2e:8095:0:b0:2b1:d4fc:75f2 with SMTP id i21-20020a2e8095000000b002b1d4fc75f2mr630704ljg.7.1686300661869; Fri, 09 Jun 2023 01:51:01 -0700 (PDT) X-Received: by 2002:a2e:8095:0:b0:2b1:d4fc:75f2 with SMTP id i21-20020a2e8095000000b002b1d4fc75f2mr630691ljg.7.1686300661480; Fri, 09 Jun 2023 01:51:01 -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: Fri, 9 Jun 2023 10:50:50 +0200 Message-ID: Subject: Re: [PATCH v4] Add .editorconfig file for basic formatting To: Jonathan Corbet Cc: 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,URIBL_BLOCKED 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 10:49=E2=80=AFAM =C3=8D=C3=B1igo Huguet wrote: > > On Fri, Jun 9, 2023 at 9:50=E2=80=AFAM Jonathan Corbet w= rote: > > > > =C3=8D=C3=B1igo Huguet writes: > > > > > EditorConfig is a specification to define the most basic code formatt= ing > > > stuff, and it's supported by many editors and IDEs, either directly o= r > > > via plugins, including VSCode/VSCodium, Vim, emacs and more. > > > > > > It allows to define formatting style related to indentation, charset, > > > end of lines and trailing whitespaces. It also allows to apply differ= ent > > > formats for different files based on wildcards, so for example it is > > > possible to apply different configs to *.{c,h}, *.py and *.rs. > > > > > > In linux project, defining a .editorconfig might help to those people > > > that work on different projects with different indentation styles, so > > > they cannot define a global style. Now they will directly see the > > > correct indentation on every fresh clone of the project. > > > > > > See https://editorconfig.org > > > > > > Co-developed-by: Danny Lin > > > Signed-off-by: Danny Lin > > > Signed-off-by: =C3=8D=C3=B1igo Huguet > > > > So I must confess to still being really nervous about installing a file > > that will silently reconfigure the editors of everybody working on the > > kernel source; I wish there were a straightforward way to do this as an > > opt-in thing. We're talking about creating a flag-day behavioral chang= e > > for, potentially, thousands of kernel developers. Something tells me > > that we might just hear from a few of them. > > > > I wonder if we should, instead, ship a file like this as something like > > Documentation/process/editorconfig, then provide a "make editorconfig" > > command that installs it in the top-level directory for those who want > > it? > > > > Or perhaps I'm worrying too much? > > This is a valid option, indeed, but In my opinion we are overlooking this= . > > 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 Sorry, forgot the link: https://editorconfig.org/ > don't think that those with built-in support are widely used for > kernel development, and many of them allow to disable the feature. > > 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. > > Also, note that, for those with editorconfig enabled in their editors, > the editor would be enforcing formatting rules that are mandatory, not > optional. > > Said that, if you still prefer to do it via `make editorconfig`, I can > change it. > > > > > Thanks, > > > > jon > > > > > -- > =C3=8D=C3=B1igo Huguet --=20 =C3=8D=C3=B1igo Huguet