Re: Add trim_trailing_whitespace to editorconfig file

Поиск
Список
Период
Сортировка
От Jelte Fennema-Nio
Тема Re: Add trim_trailing_whitespace to editorconfig file
Дата
Msg-id CAGECzQR7RVq7tyLGYToBDt2cYCn2A_zPLxNDGBFH-dgaGLxNww@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add trim_trailing_whitespace to editorconfig file  (Peter Eisentraut <peter@eisentraut.org>)
Ответы Re: Add trim_trailing_whitespace to editorconfig file  (Peter Eisentraut <peter@eisentraut.org>)
Список pgsql-hackers
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.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nazir Bilal Yavuz
Дата:
Сообщение: Use streaming read API in ANALYZE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: numeric_big in make check?