Re: Add trim_trailing_whitespace to editorconfig file
Jelte Fennema-Nio <postgres@jeltef.nl>
From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Daniel Gustafsson <daniel@yesql.se>,
Melanie Plageman <melanieplageman@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-02-19T15:21:27Z
Lists: pgsql-hackers
Attachments
- v4-0002-Include-test-output-files-in-.editorconfig.patch (text/x-patch) patch v4-0002
- v4-0001-Handle-blank-at-eof-blank-at-eol-in-.editorconfig.patch (text/x-patch) patch v4-0001
- v4-0004-Add-note-about-keeping-.editorconfig-and-.gitattr.patch (text/x-patch) patch v4-0004
- v4-0003-Bring-.editorconfig-fully-in-sync-with-.gitattrib.patch (text/x-patch) patch v4-0003
- v4-0005-Add-indent-information-about-gitattributes-to-edi.patch (text/x-patch) patch v4-0005
On Fri, 16 Feb 2024 at 11:45, Peter Eisentraut <peter@eisentraut.org> wrote: > I have committed that one. Thanks :) > v3-0002-Require-final-newline-in-.po-files.patch > > The .po files are imported from elsewhere, so I'm not sure this is going > to have the desired effect. Perhaps it's worth cleaning up, but it > would require more steps. Okay, yeah that would need to be changed at the source then. Removed this change from the newly attached patchset, as well as updating editorconfig to have "insert_final_newline = unset" for .po files. > v3-0003-Bring-editorconfig-in-line-with-gitattributes.patch > > I question whether we need to add rules to .editorconfig about files > that are generated or imported from elsewhere, since those are not meant > to be edited. I agree that it's not strictly necessary to have .editorconfig match .gitattributes for files that are not meant to be edited by hand. But I don't really see a huge downside either, apart from having a few extra lines it .editorconfig. And adding these lines does have a few benefits: 1. It makes it easy to ensure that .editorconfig and .gitattributes stay in sync 2. If someone opens a file that they are not supposed to edit by hand, and then saves it. Then no changes are made. As opposed to suddenly making some whitespace changes Attached is a new patchset with the first commit split in three separate commits, which configure: 1. Files meant to be edited by hand) 2. Output test files (maybe edited by hand) 3. Imported/autogenerated files The first one is definitely the most useful to me personally.
Commits
-
Add script to keep .editorconfig in sync with .gitattributes
- 2452e71ff2fe 18.0 landed
-
Remove non-existing file from .gitattributes
- 1d577f2eaa88 15.7 landed
- 2c7f2eb0c8aa 16.3 landed
- e85732dac0e9 17.0 landed