public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andreas Karlsson <[email protected]>
To: Jelte Fennema-Nio <[email protected]>
To: Heikki Linnakangas <[email protected]>
Cc: Tristan Partin <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Add editorconfig support for Postgres spec files
Date: Thu, 30 Apr 2026 21:24:29 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAGECzQRS1H4q_v0_od9wuxxnUHJWMW07Ei8_fjE8yjw9yiV2EA@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<CAGECzQRS1H4q_v0_od9wuxxnUHJWMW07Ei8_fjE8yjw9yiV2EA@mail.gmail.com>
On 4/17/26 22:10, Jelte Fennema-Nio wrote:
> I think in any case that script should be update to add some "DO NOT
> MODIFY MANUALLY! GENERATED USING src/tools/generate_editorconfig.py "
> header to the resulting editorconfig file. Because I agree that's not
> clear at the moment.
You mean like this? I think the comment should point them towards the
script which generated it.
--
Andreas Karlsson
Percona
Attachments:
[text/x-patch] 0001-Add-comment-clarifying-.editorconfig-is-generated.patch (1.2K, 2-0001-Add-comment-clarifying-.editorconfig-is-generated.patch)
download | inline diff:
From 72e9b5aa323756c1d1b30b597a9e5a57da227928 Mon Sep 17 00:00:00 2001
From: Andreas Karlsson <[email protected]>
Date: Thu, 30 Apr 2026 21:18:27 +0200
Subject: [PATCH] Add comment clarifying .editorconfig is generated
To make sure people do not try to manually edit .editorconfig let's add
a comment on top of the file pointing them towards where they can learn
how to generate it.
---
.editorconfig | 2 ++
src/tools/generate_editorconfig.py | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/.editorconfig b/.editorconfig
index 0ee9bd28ac4..24d3fdeae81 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,3 +1,5 @@
+# Generated by src/tools/generate_editorconfig.py
+
root = true
[*]
diff --git a/src/tools/generate_editorconfig.py b/src/tools/generate_editorconfig.py
index 0ce54f7292a..7ea1dcf5442 100755
--- a/src/tools/generate_editorconfig.py
+++ b/src/tools/generate_editorconfig.py
@@ -25,7 +25,9 @@ def main():
with open(".gitattributes", "r") as f:
lines = f.read().splitlines()
- new_contents = """root = true
+ new_contents = """# Generated by src/tools/generate_editorconfig.py
+
+root = true
[*]
indent_size = tab
--
2.43.0
view thread (5+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Add editorconfig support for Postgres spec files
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox