Re: run pgindent on a regular basis / scripted manner - Mailing list pgsql-hackers

From Tom Lane
Subject Re: run pgindent on a regular basis / scripted manner
Date
Msg-id 907239.1597513474@sss.pgh.pa.us
Whole thread Raw
In response to Re: run pgindent on a regular basis / scripted manner  (Andres Freund <andres@anarazel.de>)
List 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 by date:

Previous
From: Stephen Frost
Date:
Subject: Re: use pg_get_functiondef() in pg_dump
Next
From: Andres Freund
Date:
Subject: Re: Improving connection scalability: GetSnapshotData()