Re: run pgindent on a regular basis / scripted manner

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: run pgindent on a regular basis / scripted manner
Дата
Msg-id 47011581-ddec-1a87-6828-6edfabe6b7b6@dunslane.net
обсуждение исходный текст
Ответ на Re: run pgindent on a regular basis / scripted manner  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: run pgindent on a regular basis / scripted manner  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers


On 2023-02-04 Sa 09:20, Andrew Dunstan wrote:


On 2023-02-04 Sa 06:34, Andres Freund wrote:

ISTM that we're closer to being able to enforce pgindent than
perltidy. At the same time, I think the issue of C code in HEAD not
being indented is more pressing - IME it's much more common to have to
touch a lot of C code than to have to touch a lot fo perl files.  So
perhaps we should just start with being more stringent with C code, and
once we made perltidy less noisy, add that?


Sure, we don't have to tie them together.

I'm currently experimenting with settings on the buildfarm code, trying to get it both stable and looking nice. Then I'll try on the Postgres core code and post some results.


So here's a diff made from running perltidy v20221112 with the additional setting --valign-exclusion-list=", = => || && if unless"

Essentially this abandons those bits of vertical alignment that tend to catch us out when additions are made to the code.

I think this will make the code much more maintainable and result in much less perltidy churn. It would also mean that it's far more likely that what we would naturally code can be undisturbed by perltidy.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com
Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: undersized unions
Следующее
От: Andres Freund
Дата:
Сообщение: Re: File descriptors in exec'd subprocesses