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: Piotr Stefaniak <postgres@piotr-stefaniak.me>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-05-17T21:46:07Z
Lists: pgsql-hackers
Piotr Stefaniak <postgres@piotr-stefaniak.me> writes:
> Full copy of my pgindent attached. Changes commented below.
Thanks! I ran this, along with the indent copy I pulled from your
github repo a couple hours ago, over the current PG tree (post
Bruce's run). I got a diff extending to about 100K lines :-(
which I will not post here. It seemed like a very large fraction
of that was that old pgindent chooses to use a space rather than
a tab if the tab would only move over one column. This version
uses a tab anyway.
I hacked around that by putting back a detab/entab step at the end
using the existing subroutines in pgindent. That about halved the
size of the diff, but it's still too big to post. Much of what
I'm seeing with this version is randomly different decisions about
how far to indent comments, eg
@@ -101,8 +101,8 @@ typedef struct BloomOptions
{
int32 vl_len_; /* varlena header (do not touch directly!) */
int bloomLength; /* length of signature in words (not bits!) */
- int bitSize[INDEX_MAX_KEYS]; /* # of bits generated for
- * each index key */
+ int bitSize[INDEX_MAX_KEYS]; /* # of bits generated for each
+ * index key */
} BloomOptions;
/*
(I untabified the above fragment in the hope of making it more readable
in email.)
It does seem to be handling formatting around sizeof() calls a lot better
than the old code, as well as function pointer typedefs. So those are
huge wins. But can we avoid the changes mentioned above? I'd like the
new version to only differ in ways that are clear improvements.
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