pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Piotr Stefaniak <postgres@piotr-stefaniak.me>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Preliminary results for proposed new pgindent implementation
Date: Fri, 16 Jun 2017 18:02:15 -0400
Message-ID: <12517.1497650535@sss.pgh.pa.us> (raw)
In-Reply-To: <VI1PR03MB1199CEA13AEFE46308D9F7F5F2C10@VI1PR03MB1199.eurprd03.prod.outlook.com>
References: <20170519173111.zp6igkcg53egdy4s@alvherre.pgsql>
	<cb9eebd2-0214-1f34-51af-ebb69ec8a711@2ndquadrant.com>
	<29275.1497624664@sss.pgh.pa.us>
	<8827.1497633050@sss.pgh.pa.us>
	<20170616171946.qqy5tapovsamkxyg@alap3.anarazel.de>
	<9900.1497634441@sss.pgh.pa.us>
	<20170616180534.cdpduuq5a4twxuru@alap3.anarazel.de>
	<12302.1497637380@sss.pgh.pa.us>
	<20170616184238.GA5081@momjian.us>
	<20170616185406.jpwq6o6ghpvprxmi@alap3.anarazel.de>
	<20170616190441.GB5081@momjian.us>
	<29590.1497643007@sss.pgh.pa.us>
	<VI1PR03MB1199CEA13AEFE46308D9F7F5F2C10@VI1PR03MB1199.eurprd03.prod.outlook.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Piotr Stefaniak <postgres@piotr-stefaniak.me> writes:
> On 2017-06-16 21:56, Tom Lane wrote:
>> Unless Piotr objects, I propose to add another switch to bsdindent
>> that selects this behavior, and then we can drop entab, removing
>> another impediment to getting pgindent working.

> I understand the reasoning, but this is a very specific need and I think
> not at all universal for anyone else in the future. One of the bugs
> listed in indent's manpage is that it "has more switches than ls(1)". So
> currently I'm against pushing an option for the above upstream, to the
> FreeBSD repository.

> Why not add this to the already non-empty list of custom patches?

Umm ... I thought the idea was to get to the point where the list of
custom patches *is* empty.  Except for carrying our own Makefile of
course.  I'd be sad if we needed a fork just for this.

What I'm testing with right now has just four differences from your repo:

1. This workaround for what I believe you agree is a bug:

-	    ps.in_decl = ps.decl_on_line = ps.last_token != type_def;
+	    ps.in_decl = ps.decl_on_line = true;

2. The long-lines adjustment I just sent you a patch for.

3. The tab-vs-space difference under discussion here.

4. A temporary hack affecting the indentation of comments on the same line
(forcing them to a multiple of 8 spaces even though tabsize is 4).  I have
every intention of dropping that one later; I just don't want to deal with
comment reindentation at the same time as these other things.

			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



view thread (50+ messages)  latest in thread

Message-ID: <12517.1497650535@sss.pgh.pa.us>
Permalink:  ../12517.1497650535@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12517.1497650535@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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, postgres@piotr-stefaniak.me, bruce@momjian.us, andres@anarazel.de, peter.eisentraut@2ndquadrant.com, alvherre@2ndquadrant.com, robertmhaas@gmail.com, sfrost@snowman.net
  Subject: Re: Preliminary results for proposed new pgindent implementation
  In-Reply-To: <12517.1497650535@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