pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@postgreSQL.org
Cc: Piotr Stefaniak <postgres@piotr-stefaniak.me>
Subject: Re: pgindent (was Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)
Date: Tue, 13 Jun 2017 17:00:31 -0400
Message-ID: <30673.1497387631@sss.pgh.pa.us> (raw)
In-Reply-To: <29276.1497385419@sss.pgh.pa.us>
References: <20170517171600.fyxl3lhseszeuqrx@alvherre.pgsql>
	<AM3PR03MB1188858CCD55BC737C856F65F2E70@AM3PR03MB1188.eurprd03.prod.outlook.com>
	<880.1495045872@sss.pgh.pa.us>
	<VI1PR03MB119946C58CB0DD179DE43AD7F2E70@VI1PR03MB1199.eurprd03.prod.outlook.com>
	<5316.1495051919@sss.pgh.pa.us>
	<VI1PR03MB11999517FAD86D2C02407272F2E70@VI1PR03MB1199.eurprd03.prod.outlook.com>
	<11874.1495057567@sss.pgh.pa.us>
	<VI1PR03MB119987EDC3126CD6A56CF29CF2E40@VI1PR03MB1199.eurprd03.prod.outlook.com>
	<15819.1495145176@sss.pgh.pa.us>
	<VI1PR03MB1199E65EFAE1C1EE8E02D040F2FB0@VI1PR03MB1199.eurprd03.prod.outlook.com>
	<51717.1495410614@sss.pgh.pa.us>
	<VI1PR03MB119959F4B65F000CA7CD9F6BF2CC0@VI1PR03MB1199.eurprd03.prod.outlook.com>
	<24365.1497370969@sss.pgh.pa.us>
	<29276.1497385419@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

  changes-with-new-indent-20170613.patch.gz (application/x-gzip, 110.7K) download

view thread (37+ messages)  latest in thread

Message-ID: <30673.1497387631@sss.pgh.pa.us>
Permalink:  ../30673.1497387631@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/30673.1497387631@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org, postgres@piotr-stefaniak.me
  Subject: Re: pgindent (was Re: [COMMITTERS] pgsql: Preventive maintenance in advance of pgindent run.)
  In-Reply-To: <30673.1497387631@sss.pgh.pa.us>
  References: <20170517171600.fyxl3lhseszeuqrx@alvherre.pgsql> <AM3PR03MB1188858CCD55BC737C856F65F2E70@AM3PR03MB1188.eurprd03.prod.outlook.com> <880.1495045872@sss.pgh.pa.us> <VI1PR03MB119946C58CB0DD179DE43AD7F2E70@VI1PR03MB1199.eurprd03.prod.outlook.com> <5316.1495051919@sss.pgh.pa.us> <VI1PR03MB11999517FAD86D2C02407272F2E70@VI1PR03MB1199.eurprd03.prod.outlook.com> <11874.1495057567@sss.pgh.pa.us> <VI1PR03MB119987EDC3126CD6A56CF29CF2E40@VI1PR03MB1199.eurprd03.prod.outlook.com> <15819.1495145176@sss.pgh.pa.us> <VI1PR03MB1199E65EFAE1C1EE8E02D040F2FB0@VI1PR03MB1199.eurprd03.prod.outlook.com> <51717.1495410614@sss.pgh.pa.us> <VI1PR03MB119959F4B65F000CA7CD9F6BF2CC0@VI1PR03MB1199.eurprd03.prod.outlook.com> <24365.1497370969@sss.pgh.pa.us> <29276.1497385419@sss.pgh.pa.us> <30673.1497387631@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox