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

From Jelte Fennema
Subject Re: run pgindent on a regular basis / scripted manner
Date
Msg-id CAGECzQSu6mLzPhd7csBfnXtW9kfoVRn5TWFH1fPGMc4mpkHyOw@mail.gmail.com
Whole thread Raw
In response to Re: run pgindent on a regular basis / scripted manner  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: run pgindent on a regular basis / scripted manner  (Michael Paquier <michael@paquier.xyz>)
Re: run pgindent on a regular basis / scripted manner  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Now that the PG16 feature freeze happened I think it's time to bump
this thread again. As far as I remember everyone that responded (even
previously silent people) were themselves proponents of being more
strict around pgindent.

I think there's two things needed to actually start doing this:
1. We need to reindent the tree to create an indented baseline
2. We need some automation to complain about unindented code being committed

For 2 the upstream thread listed two approaches:
a. Install a pre-receive git hook on the git server that rejects
pushes to master that are not indented
b. Add a test suite that checks if the code is correctly indented, so
the build farm would complain about it. (Suggested by Peter E)

I think both a and b would work to achieve 2. But as Peter E said, b
indeed sounds like less of a divergence of the status quo. So my vote
would be for b. If that doesn't achieve 2 for some reason, or turns
out to have problems we can always change to a afterwards.



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert
Next
From: " Legs Mansion"
Date:
Subject: Re: A Question about InvokeObjectPostAlterHook