Re: pgindent (was Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Cc: Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me>
Subject: Re: pgindent (was Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)
Date: 2017-06-13 21:00:31
Message-ID: 30673.1497387631@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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

Attachment Content-Type Size
changes-with-new-indent-20170613.patch.gz application/x-gzip 110.7 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2017-06-13 21:12:13 Re: pgindent (was Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)
Previous Message Piotr Stefaniak 2017-06-13 20:52:32 Re: pgindent (was Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-06-13 21:08:17 Re: v10beta pg_catalog diagrams
Previous Message Thomas Munro 2017-06-13 20:56:43 Re: RTE_NAMEDTUPLESTORE, enrtuples and comments