Re: pgindent behavior we could do without

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: pgindent behavior we could do without
Date: 2013-07-19 15:11:30
Message-ID: 51E95722.3030109@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 07/18/2013 11:30 PM, Tom Lane wrote:
> Noah Misch <noah(at)leadboat(dot)com> writes:
>> On Thu, Jul 18, 2013 at 12:27:21AM -0400, Tom Lane wrote:
>>> It's always annoyed me that pgindent insists on adjusting vertical
>>> whitespace around #else and related commands. This has, for example,
>>> rendered src/include/storage/barrier.h nigh illegible: you get things
>>> like
>> Agreed. I've similarly disliked how pgindent adds a blank line between an #if
>> and a multi-line comment, like at the top of get_restricted_token().
> AFAICT it forces a blank line before a multiline comment in most
> contexts; #if isn't special (though it does seem to avoid doing that
> just after a left brace). I too don't much care for that behavior,
> although it's not as detrimental to readability as removing blank lines
> can be.
>
> In general, pgindent isn't nearly as good about managing vertical
> whitespace as it is about horizontal spacing ...
>

I agree.

I should perhaps note that when I rewrote pgindent, I deliberately
didn't editorialize about its behaviour - but I did intend to make it
more maintainable and simpler to change stuff like this, and so it is :-)

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 2013-07-19 15:13:13 Re: [ODBC] getting rid of SnapshotNow
Previous Message Andrew Dunstan 2013-07-19 15:06:49 Re: confusing typedefs in jsonfuncs.c