From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "Stephen Frost" <sfrost(at)snowman(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Preliminary results for proposed new pgindent implementation |
Date: | 2017-06-16 22:02:15 |
Message-ID: | 12517.1497650535@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Piotr Stefaniak | 2017-06-16 22:52:53 | Re: Preliminary results for proposed new pgindent implementation |
Previous Message | Tom Lane | 2017-06-16 21:48:49 | Re: Preliminary results for proposed new pgindent implementation |