Re: run pgindent on a regular basis / scripted manner

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Étienne BERSAC <etienne(dot)bersac(at)dalibo(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jelte Fennema <postgres(at)jeltef(dot)nl>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, "shiy(dot)fnst(at)fujitsu(dot)com" <shiy(dot)fnst(at)fujitsu(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, 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>, Jesse Zhang <sbjesse(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Subject: Re: run pgindent on a regular basis / scripted manner
Date: 2023-10-27 12:14:52
Message-ID: c613ae61-9575-8d40-5b9c-cf6c14fe0d14@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2023-10-27 Fr 03:14, Étienne BERSAC wrote:
> Hello,
>
>
>> Yes, there's a lot to look out for, and you're a damn sight better at
>> it
>> than I am. But we should try to automate the things that can be
>> automated, even if that leaves many tasks that can't be. I have three
>> things in my pre-commit hook: a check for catalog updates, a check
>> for
>> new typedefs, and an indent check.
> Could you share your configuration ? Could we provide more helper and
> integration to help produce consistent code ?

Sure. pre-commit hook file attached. I'm sure this could be improved on.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachment Content-Type Size
pre-commit text/plain 2.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2023-10-27 12:19:27 Annoying corruption in PostgreSQL.
Previous Message Ashutosh Bapat 2023-10-27 12:09:24 Re: Infinite Interval