Re: run pgindent on a regular basis / scripted manner

From: Nikita Malakhov <hukutoc(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Jelte Fennema <postgres(at)jeltef(dot)nl>, Peter Geoghegan <pg(at)bowt(dot)ie>, Bruce Momjian <bruce(at)momjian(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, 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-23 18:54:15
Message-ID: CAN-LCVNctZtm=GGa7WSxyH85GQDof-h0ok4v1VcS+8j1LivApg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

I've ran pdindent on the whole Postgres and it'd changed
an awful lot of source files. Won't it create a lot of merge conflicts?

On Mon, Jan 23, 2023 at 8:48 PM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
wrote:

> On 2023-Jan-23, Tom Lane wrote:
>
> > 1. [...] So now I think that we should
> > stick to the convention that it's on the user to install
> > pg_bsd_indent somewhere in their PATH; all we'll be doing with
> > this change is eliminating the step of fetching pg_bsd_indent's
> > source files from somewhere else.
>
> +1
>
> > 2. Given #1, it'll be prudent to continue having pgindent
> > double-check that pg_bsd_indent reports a specific version
> > number. We could imagine starting to use the main Postgres
> > version number for that, but I'm inclined to continue with
> > its existing numbering series.
>
> +1
>
> > 3. If we do nothing special, the first mass reindentation is
> > going to reformat the pg_bsd_indent sources per PG style,
> > which is ... er ... not the way they look now. Do we want
> > to accept that outcome, or take steps to prevent pgindent
> > from processing pg_bsd_indent? I have a feeling that manual
> > cleanup would be necessary if we let such reindentation
> > happen, but I haven't experimented.
>
> Hmm, initially it must just be easier to have an exception so that
> pg_bsd_indent itself isn't indented.
>
> --
> Álvaro Herrera 48°01'N 7°57'E —
> https://www.EnterpriseDB.com/
> #error <https://www.EnterpriseDB.com/#error> "Operator lives in the wrong
> universe"
> ("Use of cookies in real-time system development", M. Gleixner, M. Mc
> Guire)
>
>
>

--
Regards,
Nikita Malakhov
Postgres Professional
https://postgrespro.ru/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2023-01-23 18:59:29 Re: Add SHELL_EXIT_CODE to psql
Previous Message Andrew Dunstan 2023-01-23 18:52:46 Re: run pgindent on a regular basis / scripted manner