* [gentoo-dev] [PATCH 1/3] [QA] fix .editorconfig
@ 2024-05-05 14:45 Paul Zander
2024-05-05 15:48 ` [gentoo-dev] [PATCH 2/3] [QA] allow overriding settings Paul Zander
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Paul Zander @ 2024-05-05 14:45 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
This series of patches is meant as a basis to fix the .editorconfig used in
::gentoo. Initial reason was that .patch files are being broken by
the current version.
trimming trailing whitespace breaks patches
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
---
.editorconfig | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.editorconfig b/.editorconfig
index 7d6e17345e1..f2cd7328e57 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,3 +1,6 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
# https://editorconfig.org/
root = true
@@ -9,3 +12,6 @@ indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
#max_line_length = 80
+
+[*.patch]
+trim_trailing_whitespace = false
--
2.45.0
[-- Attachment #2: Type: text/html, Size: 1019 bytes --]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-dev] [PATCH 2/3] [QA] allow overriding settings
2024-05-05 14:45 [gentoo-dev] [PATCH 1/3] [QA] fix .editorconfig Paul Zander
@ 2024-05-05 15:48 ` Paul Zander
2024-05-05 15:50 ` [gentoo-dev] [PATCH 3/3] [QA] drop indent_size Paul Zander
2024-05-05 19:04 ` [gentoo-dev] [PATCH 2/3] [QA] allow overriding settings Eli Schwartz
2024-05-05 17:45 ` [gentoo-dev] [PATCH 1/3] [QA] fix .editorconfig Ulrich Mueller
2024-09-19 7:24 ` Sam James
2 siblings, 2 replies; 8+ messages in thread
From: Paul Zander @ 2024-05-05 15:48 UTC (permalink / raw
To: negril.nx+gentoo, gentoo-dev
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
[*.{ebuild,eclass}]
charset = utf-8
--
2.45.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-dev] [PATCH 3/3] [QA] drop indent_size
2024-05-05 15:48 ` [gentoo-dev] [PATCH 2/3] [QA] allow overriding settings Paul Zander
@ 2024-05-05 15:50 ` Paul Zander
2024-05-05 17:53 ` Ulrich Mueller
2024-05-05 18:56 ` Eli Schwartz
2024-05-05 19:04 ` [gentoo-dev] [PATCH 2/3] [QA] allow overriding settings Eli Schwartz
1 sibling, 2 replies; 8+ messages in thread
From: Paul Zander @ 2024-05-05 15:50 UTC (permalink / raw
To: negril.nx+gentoo, gentoo-dev
indent_size is the width in spaces, we use tabs.
tab_width would be the tab width in spaces, but there is no reason to force this.
Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
---
.editorconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.editorconfig b/.editorconfig
index dc1d5587a8b..04a69b17304 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -8,9 +8,8 @@ charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
-indent_size = 4
trim_trailing_whitespace = true
-#max_line_length = 80
+# max_line_length = 80
[*.patch]
trim_trailing_whitespace = false
--
2.45.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] [PATCH 3/3] [QA] drop indent_size
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
1 sibling, 0 replies; 8+ messages in thread
From: Ulrich Mueller @ 2024-05-05 17:53 UTC (permalink / raw
To: Paul Zander; +Cc: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 594 bytes --]
>>>>> On Sun, 05 May 2024, Paul Zander wrote:
> indent_size is the width in spaces, we use tabs.
> tab_width would be the tab width in spaces, but there is no reason to
> force this.
The Devmanual says that "each tab represents four spaces" [1,2], and
ebuild-mode implements it so [3]. Maybe it would be good to stay
consistent for different editors?
[1] https://devmanual.gentoo.org/quickstart/index.html#basic-format
[2] https://devmanual.gentoo.org/ebuild-writing/file-format/index.html#indenting-and-whitespace
[3] https://gitweb.gentoo.org/proj/ebuild-mode.git/tree/ebuild-mode.el#n416
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] [PATCH 3/3] [QA] drop indent_size
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
1 sibling, 0 replies; 8+ messages in thread
From: Eli Schwartz @ 2024-05-05 18:56 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1.1.1: Type: text/plain, Size: 868 bytes --]
On 5/5/24 11:50 AM, Paul Zander wrote:
> indent_size is the width in spaces, we use tabs.
> tab_width would be the tab width in spaces, but there is no reason to force this.
>
> Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
> ---
> .editorconfig | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/.editorconfig b/.editorconfig
> index dc1d5587a8b..04a69b17304 100644
> --- a/.editorconfig
> +++ b/.editorconfig
> @@ -8,9 +8,8 @@ charset = utf-8
> end_of_line = lf
> insert_final_newline = true
> indent_style = tab
> -indent_size = 4
> trim_trailing_whitespace = true
> -#max_line_length = 80
> +# max_line_length = 80
Commit message is silent on this line, which isn't about dropping indent
size but rather about reformatting the comments for the editorconfig
file itself...
--
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 --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] [PATCH 2/3] [QA] allow overriding settings
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 19:04 ` Eli Schwartz
1 sibling, 0 replies; 8+ messages in thread
From: Eli Schwartz @ 2024-05-05 19:04 UTC (permalink / raw
To: gentoo-dev
[-- 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 --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] [PATCH 1/3] [QA] fix .editorconfig
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 17:45 ` Ulrich Mueller
2024-09-19 7:24 ` Sam James
2 siblings, 0 replies; 8+ messages in thread
From: Ulrich Mueller @ 2024-05-05 17:45 UTC (permalink / raw
To: Paul Zander; +Cc: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 332 bytes --]
>>>>> On Sun, 05 May 2024, Paul Zander wrote:
> +# Copyright 1999-2024 Gentoo Authors
> +# Distributed under the terms of the GNU General Public License v2
No objections to a copyright header, though we probably don't need one
for a short file like this. But make it a realistic starting year since
the file didn't exist in 1999.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-dev] [PATCH 1/3] [QA] fix .editorconfig
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 17:45 ` [gentoo-dev] [PATCH 1/3] [QA] fix .editorconfig Ulrich Mueller
@ 2024-09-19 7:24 ` Sam James
2 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-09-19 7:24 UTC (permalink / raw
To: Paul Zander; +Cc: gentoo-dev
Paul Zander <negril.nx+gentoo@gmail.com> writes:
> This series of patches is meant as a basis to fix the .editorconfig used in ::gentoo. Initial reason was that .patch
> files are being broken by the current version.
>
> trimming trailing whitespace breaks patches
>
> Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
> ---
> .editorconfig | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/.editorconfig b/.editorconfig
> index 7d6e17345e1..f2cd7328e57 100644
> --- a/.editorconfig
> +++ b/.editorconfig
> @@ -1,3 +1,6 @@
> +# Copyright 1999-2024 Gentoo Authors
> +# Distributed under the terms of the GNU General Public License v2
> +
> # https://editorconfig.org/
> root = true
>
> @@ -9,3 +12,6 @@ indent_style = tab
> indent_size = 4
> trim_trailing_whitespace = true
> #max_line_length = 80
> +
> +[*.patch]
> +trim_trailing_whitespace = false
This first patch is OK and I'll pull it in. The others need to be respun
with commit messages describing it.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-09-19 7:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [gentoo-dev] [PATCH 2/3] [QA] allow overriding settings Eli Schwartz
2024-05-05 17:45 ` [gentoo-dev] [PATCH 1/3] [QA] fix .editorconfig Ulrich Mueller
2024-09-19 7:24 ` Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox