Re: run pgindent on a regular basis / scripted manner

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: run pgindent on a regular basis / scripted manner
Дата
Msg-id 907239.1597513474@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: run pgindent on a regular basis / scripted manner  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> One thing is that some here are actively against manually adding entries
> to typedefs.list.

I've been of the opinion that it's pointless to do so under the current
regime where (a) only a few people do that and (b) we only officially
re-indent once a year anyway.  When I want to manually run pgindent,
I always pull down a fresh typedefs.list from the buildfarm, which is
reasonably up-to-date regardless of what people added or didn't add,
and then add any new typedefs from my current patch to that out-of-tree
copy.

Now, if we switch to a regime where we're trying to keep the tree in
more nearly correctly-indented shape all the time, it would make sense
to revisit that.  I'm not saying that it's unreasonable to want to have
the in-tree typedefs.list track reality more closely --- only that doing
so in a half-baked way won't be very helpful.

>> I think as a start, we could just issue a guidelines that all committed code
>> should follow pgindent.  That has never really been a guideline, so it's not
>> surprising that it's not followed.

> Without a properly indented baseline that's hard to do, because it'll
> cause damage all over. So I don't think we easily can start just there -
> we'd first need to re-indent everything.

Well, we can certainly do a tree-wide re-indent anytime we're ready.
I doubt it would be very painful right now, with so little new work
since the last run.

            regards, tom lane



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: use pg_get_functiondef() in pg_dump
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Improving connection scalability: GetSnapshotData()