Re: Add trim_trailing_whitespace to editorconfig file

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Jelte Fennema-Nio <postgres@jeltef.nl>, Andrew Dunstan <andrew@dunslane.net>
Cc: Daniel Gustafsson <daniel@yesql.se>, Melanie Plageman <melanieplageman@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Matthias van de Meent <boekewurm+postgres@gmail.com>
Date: 2024-08-09T13:16:11Z
Lists: pgsql-hackers
On 07.08.24 22:42, Jelte Fennema-Nio wrote:
> I also added a .gitattributes rule for .py files, and changed the
> default tab_width to unset. Because I realized the resulting
> .editorconfig was using tab_width 8 for python files when editing
> src/tools/generate_editorconfig.py

This looks kind of weird:

-*.sgml		whitespace=space-before-tab,trailing-space,tab-in-indent
-*.x[ms]l	whitespace=space-before-tab,trailing-space,tab-in-indent
+*.py		whitespace=space-before-tab,trailing-space,tab-in-indent,tabwidth=4
+*.sgml		whitespace=space-before-tab,trailing-space,tab-in-indent,tabwidth=1
+*.xml		whitespace=space-before-tab,trailing-space,tab-in-indent,tabwidth=1
+*.xsl		whitespace=space-before-tab,trailing-space,tab-in-indent,tabwidth=2

Why add tabwidth settings to files that are not supposed to contain tabs?



Commits

  1. Add script to keep .editorconfig in sync with .gitattributes

  2. Remove non-existing file from .gitattributes