pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add script to keep .editorconfig in sync with .gitattributes
Date: Sat, 01 Feb 2025 09:10:56 +0000
Message-ID: <E1te9Wi-004mp1-A9@gemulon.postgresql.org> (raw)

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@jeltef.nl>
Discussion: https://www.postgresql.org/message-id/flat/CAGECzQQGzbroAXi+Yicp3HvcCo4=g84kaOgjuvQ5MW9F0ubOGg@mail....

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



Message-ID: <E1te9Wi-004mp1-A9@gemulon.postgresql.org>
Permalink:  ../E1te9Wi-004mp1-A9@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1te9Wi-004mp1-A9@gemulon.postgresql.org

 · 

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: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add script to keep .editorconfig in sync with .gitattributes
  In-Reply-To: <E1te9Wi-004mp1-A9@gemulon.postgresql.org>

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

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox