Re: pgindent (was Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@postgreSQL.org
Cc: Piotr Stefaniak <postgres@piotr-stefaniak.me>
Date: 2017-06-13T21:00:31Z
Lists: pgsql-hackers
Attachments
- changes-with-new-indent-20170613.patch.gz (application/x-gzip) patch
Attached is a diff from git HEAD to what I get with a slightly-patched copy of Piotr Stefaniak's latest version of FreeBSD indent. It looks pretty darn good to me: the changes around function typedefs and expressions containing things like sizeof() calls are alone worth the price of admission. There are some places where it inserts extra space because it doesn't know that a given symbol is a typedef name, but as I remarked upthread, that's the fault of our typedef-list collection technology not indent itself. There are not enough of those places to make me feel like we have to have a solution right now. There are also places where it changes its mind on how much to indent a comment-to-the-right-of-code. I have a hack in my indent copy that reduces the number of such diffs, but doesn't eliminate them entirely. Removing the hack will cause indent to align such comments to the next 4-space tab stop rather than the next 8-space stop as has been its behavior in the past. I think we should accept that change, because it will allow squeezing a bit more text into such comments than before, but in the interests of keeping the attached diff readable I've tried to suppress most of those changes for the moment. Anyway, it is now time to fish or cut bait. I don't think we can wait much longer to decide whether we're going to adopt this new indent version for PG 10. I think we should. The floor is open for votes. regards, tom lane
Commits
-
Manually un-break a few URLs that pgindent used to insist on splitting.
- 780b3a4c43fd 10.0 landed
-
Remove entab and associated detritus.
- 81f056c7256f 10.0 landed
-
Phase 3 of pgindent updates.
- 382ceffdf7f6 10.0 landed
-
Phase 2 of pgindent updates.
- c7b8998ebbf3 10.0 landed
-
Initial pgindent run with pg_bsd_indent version 2.0.
- e3860ffa4dd0 10.0 landed
-
Adjust pgindent script to use pg_bsd_indent 2.0.
- 8ff6d4ec7840 10.0 landed
-
Final pgindent run with old pg_bsd_indent (version 1.3).
- 9ef2dbefc7fb 10.0 landed
-
Re-run pgindent.
- 651902deb155 10.0 landed
-
Preventive maintenance in advance of pgindent run.
- c079673dcb7f 10.0 cited