Re: run pgindent on a regular basis / scripted manner
| От | Tom Lane |
|---|---|
| Тема | Re: run pgindent on a regular basis / scripted manner |
| Дата | |
| Msg-id | 530189.1691880417@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: run pgindent on a regular basis / scripted manner (Andres Freund <andres@anarazel.de>) |
| Ответы |
Re: run pgindent on a regular basis / scripted manner
|
| Список | pgsql-hackers |
Andres Freund <andres@anarazel.de> writes:
> On 2023-08-12 17:03:37 -0400, Andrew Dunstan wrote:
>> My recollection is that missing typedefs cause indentation that kinda sticks
>> out like a sore thumb.
Yeah, it's usually pretty obvious: "typedef *var" gets changed to
"typedef * var", and similar oddities.
> It's a somewhat annoying task though, find all the typedefs, add them to the
> right place in the file (we have an out of order entry right now). I think a
> script that *adds* (but doesn't remove) local typedefs would make this less
> painful.
My practice has always been "add typedefs until pgindent doesn't do
anything I don't want". If you have a new typedef that doesn't happen
to be used in a way that pgindent mangles, it's not that critical
to get it into the file right away.
regards, tom lane
В списке pgsql-hackers по дате отправления: