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
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