Re: run pgindent on a regular basis / scripted manner

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Jelte Fennema <postgres(at)jeltef(dot)nl>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Noah Misch <noah(at)leadboat(dot)com>, Jesse Zhang <sbjesse(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: run pgindent on a regular basis / scripted manner
Date: 2023-01-22 03:19:15
Message-ID: CAH2-Wzn6=JeS=UzFSS0N1ytT35UUOqrTBg=JnRLbj1yJm0By_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 21, 2023 at 3:39 PM Jelte Fennema <postgres(at)jeltef(dot)nl> wrote:
> I was unable to get either of them to produce the weird alignment of
> declarations that pgindent outputs. Maybe that's just because I don't
> understand what this alignment is supposed to do. Because to me the
> current alignment seems completely random most of the time (and like
> Andres said also not very unhelpful). For clang-format you should use
> at least clang-format 15, otherwise it has some bugs in the alignment
> logic.

Really? I have been using 14, which is quite recent. Did you just
figure this out recently? If this is true, then it's certainly
discouraging.

I don't have a problem with the current pgindent alignment of function
parameters, so not sure what you mean about that. It *was* terrible
prior to commit e3860ffa, but that was back in 2017 (pg_bsd_indent 2.0
fixed that problem).

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2023-01-22 03:19:58 Re: Decoupling antiwraparound autovacuum from special rules around auto cancellation
Previous Message James Coleman 2023-01-22 03:07:58 Re: Parallelize correlated subqueries that execute within each worker