Re: pgindent complaint of the day - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pgindent complaint of the day
Date
Msg-id 200410070302.i9732SL00572@candle.pha.pa.us
Whole thread Raw
In response to pgindent complaint of the day  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgindent complaint of the day
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > and this does exactly as you describe by putting the comment on its own
> > line.  I just changed it to:
> > ...
> > so that the new comment will have the same indenting as the else that
> > was input.
> 
> If it were "the else's indent plus one more tab" it would be reasonably
> sane; it'd match the indentation of what comes next.

OK, I can do that but consider:
else /* comment */{    something;}

If we go without the special indent we get at worst case:
else/* comment */    something;

while with an extra indent we get this as worst case:
else     /* comment */{    something;}

which seems like a worse worst case.  :-)

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: SRF/dropped column bug
Next
From: Tom Lane
Date:
Subject: Re: pgindent complaint of the day