Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5845751rwl; Tue, 4 Apr 2023 04:41:27 -0700 (PDT) X-Google-Smtp-Source: AKy350bb0Rhh/5hrlAdq5HA6ftKv3fDAjf68CPIuRcmQxDvtbQhU2ro7+K4oashaQ4kuWi8+igRj X-Received: by 2002:a17:906:c096:b0:8f1:949f:37b5 with SMTP id f22-20020a170906c09600b008f1949f37b5mr2095512ejz.32.1680608486974; Tue, 04 Apr 2023 04:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680608486; cv=none; d=google.com; s=arc-20160816; b=fI/aL2stUFoYrnQx6uziDvJ6OKcd4M1xDDcf2G9hy/P5vx2EWYafCTbmnOoIJLiaoW wZ1MFe8UFUj5lszlGElRZW3UNpbR0ZH5DnrQX88epiHg9Cwo52oDHVg8Pu7Oy9k4m+3m /h6wrvywkK2UyPBVS2gcxAtQ6WX2BeNx7pRp9EUk5NVhFeuuv1zMV4dTNEqsiy6AKAHd GOZ5t5qO5cPF2Zou2Bg7P9Pe4zE5lZpQiwXc+BzYkQ21oN35bKQ6BEdwOKmx8P/ti52I KARvQ8fAMaub/i4zV/MPB/CaYpF8/WKtvc/AvifCXgmQx7bHINyWtRidegBFTPvEDlfN PVWA== 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=DQ1ixt4I5eKbz7gsvcX9jwc/HOMjJPpO7V63NSQms/A=; b=LsTLHBBSrs/w76hgXFceyc90XQVWrtPHD9ynH9aTu/EeAX0PpLD5vWyR1YWs89c5Kj /WRrsw2cLsePBWE9fcsK62tJeLmYAxycqyTOfs/LK2kj+U8GpL0wKD5cZ6m6KgRfEttE fzrt2s4k7p0R5iwg+xNqvizWREmCFnWe7S2ih3Y+03f7jvLtJLMWF2n65Kt9DGe0Zmyv 37v5Vnug3Tugjc8tHYvbexU+kKvSDVzYt5YQ/g9cEOkirewogLY/YmDbK6spa8RcW4SC 3Y32SALDaAUvt6cCx3iYgYuSHQywXFv4yMpQMsaimr+gYAF/YenRsNREIlmJlZ5VkPN2 tTgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E5W2AiSt; 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 k13-20020a1709065fcd00b0092cf025c703si251847ejv.928.2023.04.04.04.41.02; Tue, 04 Apr 2023 04:41:26 -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=E5W2AiSt; 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 S234159AbjDDLjj (ORCPT + 99 others); Tue, 4 Apr 2023 07:39:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229551AbjDDLjh (ORCPT ); Tue, 4 Apr 2023 07:39:37 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05B728F for ; Tue, 4 Apr 2023 04:38:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680608267; 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=DQ1ixt4I5eKbz7gsvcX9jwc/HOMjJPpO7V63NSQms/A=; b=E5W2AiStuu7T+Vznxd5rTb2FaOYwmK1qW7IkW9yMTTVRjBvwHdT0EpZj01PQg/xX2wVRG5 LwVOd0QwEgiIC0LJzv8yLqwBh/0D1LXNokDq57o3bgrrmAOBeHsxiT5fhcKGwWFUjERg87 oNWq+LK9g0nxdHDNrdQVg9pSBB+XNYU= 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-636-ngb4sOebNnGBqysFPpmDJw-1; Tue, 04 Apr 2023 07:37:46 -0400 X-MC-Unique: ngb4sOebNnGBqysFPpmDJw-1 Received: by mail-lj1-f197.google.com with SMTP id t7-20020a2e8e67000000b002a5faaf797fso5519468ljk.9 for ; Tue, 04 Apr 2023 04:37:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680608265; 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=DQ1ixt4I5eKbz7gsvcX9jwc/HOMjJPpO7V63NSQms/A=; b=W8GN/CKB+GtkrA7y0mKePTZ5rIBpXYllGU+6puu4s9RQ6fsz+9RBY9bebFs/bzOpPR ZUG1/cLLjb6hXt8aPCCAgVsqNQahm2Dc2teBDziNQLxVJMXHx4PUZELCT5Tq0agATF/f eVAfr5+ZBRW1uOzQrLigv8ehQGrMNB777NPKWoQJSWZSDswWiBS967l2v/JBuSOB2GIL c9ky4q1Nwmo4nz44i130sxwnnEEvzLYOiokwjIQqp57jdxhx+i4JrpI+scsToBez717o BO0OQcwvkdhP4PRwMa8y41P4Yamo1ZVkdF45kd7nSsS/MnSbJNTn0YzZIjEhgLIUOYYN qORw== X-Gm-Message-State: AAQBX9fdkq0jHeOLj+ZeVjSfv5hnQl6rF7woad+rIo3rlWmnakUki41B TU7cSDtSf4fDWpnuwLZ31g9iRo88lX25i003kBmmdiYTczCdC1fp0U943eSgFfkdUlkqqGxQIaV M53k7xf3zBT5Nz9WoNE41hmLQLqlYqwFeoQGqMCZq X-Received: by 2002:ac2:592b:0:b0:4d5:ca32:9bd6 with SMTP id v11-20020ac2592b000000b004d5ca329bd6mr635862lfi.2.1680608264961; Tue, 04 Apr 2023 04:37:44 -0700 (PDT) X-Received: by 2002:ac2:592b:0:b0:4d5:ca32:9bd6 with SMTP id v11-20020ac2592b000000b004d5ca329bd6mr635853lfi.2.1680608264646; Tue, 04 Apr 2023 04:37:44 -0700 (PDT) MIME-Version: 1.0 References: <20230404075540.14422-1-ihuguet@redhat.com> In-Reply-To: From: =?UTF-8?B?w43DsWlnbyBIdWd1ZXQ=?= Date: Tue, 4 Apr 2023 13:37:33 +0200 Message-ID: Subject: Re: [PATCH v2] Add .editorconfig file for basic formatting To: Miguel Ojeda Cc: Danny Lin , ojeda@kernel.org, masahiroy@kernel.org, jgg@nvidia.com, mic@digikod.net, linux-kernel@vger.kernel.org, Jonathan Corbet , Joe Perches , Rasmus Villemoes , Matthew Wilcox Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 Tue, Apr 4, 2023 at 11:51=E2=80=AFAM Miguel Ojeda wrote: > > Hi =C3=8D=C3=B1igo, > > On Tue, Apr 4, 2023 at 9:55=E2=80=AFAM =C3=8D=C3=B1igo Huguet wrote: > > > > EditorConfig is a specification to define the most basic code formattin= g > > stuff, and it's supported by many editors and IDEs, either directly or > > via plugins, including VSCode/VSCodium, Vim, emacs and more. > > Please see https://lore.kernel.org/lkml/20200703073143.423557-1-danny@kdr= ag0n.dev/ > for a previous patch & discussion, as well as commit fa60ce2cb450 > ("treewide: remove editor modelines and cruft") for a related cleanup. > Cc'ing those that gave some feedback back then. > > Danny's v2 patch has some extra extensions/languages it manages as > well as some docs, and yours handles things that one doesn't, like the > Rust files and `Makefile.*` cases. So it would be nice to get a > version that merges everything from both of you, likely as > co-developers. I will be happy to prepare the patch, as co-developers, if Danny agrees. > It still remains important to see if somebody's workflow could break > due to this, especially for the catch-all section `[*]` and for > options like `trim_trailing_whitespace` which can actually break > things like patch files as you note in the changelog. Perhaps landing > it in linux-next for an extended period of time (e.g. a few kernel > cycles) is one way to find out, or we could start without the > "dangerous" options. What do others think? I can move everything from [*] to the extension based sections (*.{c,h} and so on), so it is safer. It can only happen that someone notices that a weird file is not auto-formatted, and hopefully gives feedback to add it to .editorconfig. About the potential break of some workflows, and after reading the previous conversation, I don't think there is much else we can do. In any case, it won't be that harmful: using editorconfig is almost always opt-in, and if anyone has a problem, he will disable editorconfig to complete the changes and hopefully give feedback. If you think that it's better to keep it in linux-next for some time, it's fine, but I don't think it's necessary. As I say, I don't think it can be that much disturbing. Finally, about the files without extension but with a shebang, mentioned by Masahiro, it seems that they're seriously considering supporting tags based on language, like [[python]] and [[bash]], but nothing has been done yet, so, again, there's no much we can do. If someone frequently update specific files and want editorconfig formatting for them, their full paths can be added. Regards > By the way, for the next/merged version, in your side please keep > `!.editorconfig` sorted and in the other side please avoid the > duplicated `.tc` case (which I just noticed). > > Cheers, > Miguel > --=20 =C3=8D=C3=B1igo Huguet