public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Eli Schwartz <eschwartz93@gmail.com>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH 2/3] [QA] allow overriding settings
Date: Sun, 5 May 2024 15:04:19 -0400	[thread overview]
Message-ID: <dc8c3432-e85a-4093-b5df-657f63eb065c@gmail.com> (raw)
In-Reply-To: <20240505154819.24403-1-negril.nx+gentoo@gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1726 bytes --]

On 5/5/24 11:48 AM, Paul Zander wrote:
> Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
> ---
>  .editorconfig | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/.editorconfig b/.editorconfig
> index f2cd7328e57..dc1d5587a8b 100644
> --- a/.editorconfig
> +++ b/.editorconfig
> @@ -2,7 +2,6 @@
>  # Distributed under the terms of the GNU General Public License v2
>  
>  # https://editorconfig.org/
> -root = true

Can you explain the goal of this better? Removing this setting tells
editorconfig that the gentoo.git repo is a subdirectory of a wider
project scope, and that it should check e.g. /var/db/repos/.editorconfig
and /var/db/.editorconfig and /var/.editorconfig as well -- and in the
event of two files trying to set the same editorconfig setting, the file
you're editing in this patch wins.

So this will not actually allow one to override settings, for two reasons:

- it imposes an awkward UX requirement that the way to override settings
  is to move your gentoo.git clone into a subdirectory of a dedicated
  directory existing solely to provide its own .editorconfig file along
  with the gentoo/ (clone) directory

- it does exactly the opposite of overriding settings, because it allows
  you to set non-overriding defaults

and it also requires editorconfig tooling to walk every directory upward
until it reaches the / directory to check for more files, which is a
pointless waste. The editorconfig standard *specifically* expects you to
set root=true at the top level scope of your project, and this patch is
in opposition to the recommended workflow.

What workflow are you envisioning people will use if this patch is merged?

-- 
Eli Schwartz

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 18399 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2024-05-05 19:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-05 14:45 [gentoo-dev] [PATCH 1/3] [QA] fix .editorconfig Paul Zander
2024-05-05 15:48 ` [gentoo-dev] [PATCH 2/3] [QA] allow overriding settings Paul Zander
2024-05-05 15:50   ` [gentoo-dev] [PATCH 3/3] [QA] drop indent_size Paul Zander
2024-05-05 17:53     ` Ulrich Mueller
2024-05-05 18:56     ` Eli Schwartz
2024-05-05 19:04   ` Eli Schwartz [this message]
2024-05-05 17:45 ` [gentoo-dev] [PATCH 1/3] [QA] fix .editorconfig Ulrich Mueller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc8c3432-e85a-4093-b5df-657f63eb065c@gmail.com \
    --to=eschwartz93@gmail.com \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox