pgsql: Add script to keep .editorconfig in sync with .gitattributes

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add script to keep .editorconfig in sync with .gitattributes
Date: 2025-02-01 09:10:56
Message-ID: E1te9Wi-004mp1-A9@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add script to keep .editorconfig in sync with .gitattributes

Our repo already contained an .editorconfig file, but it was not kept
up to date with .gitattributes. This adds a script that keeps these
files in sync. A big advantage of the editorconfig file is that it
many editors/IDEs get automatically configured to trim trailing
newlines and add a final newline on save, while .gitattributes only
complains about these problems instead of automatically fixing them.

This also adds rules to .gitattributes for Python files as well as for
C files in pg_bsd_indent directory (which have a different tab_width
than most C files due to being vendored in).

Author: Jelte Fennema-Nio <github-tech(at)jeltef(dot)nl>
Discussion: https://www.postgresql.org/message-id/flat/CAGECzQQGzbroAXi+Yicp3HvcCo4=g84kaOgjuvQ5MW9F0ubOGg(at)mail(dot)gmail(dot)com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2452e71ff2fe642ff35535d48a728aeca2d61a8d

Modified Files
--------------
.editorconfig | 170 ++++++++++++++++++++++++++++++++++++-
.gitattributes | 7 +-
src/tools/generate_editorconfig.py | 94 ++++++++++++++++++++
3 files changed, 266 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2025-02-01 09:34:54 pgsql: Rename GistTranslateStratnum() to GistTranslateCompareType()
Previous Message Amit Langote 2025-02-01 07:50:49 pgsql: Add commit 76aa615943 to .git-blame-ignore-revs