Re: Add "format" target to make and ninja to run pgindent and pgperltidy

From: "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Ashutosh Bapat" <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Daniel Gustafsson" <daniel(at)yesql(dot)se>
Subject: Re: Add "format" target to make and ninja to run pgindent and pgperltidy
Date: 2026-03-04 09:18:49
Message-ID: DGTVWJWZB0C9.CKSLBGGSXN4F@jeltef.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed Dec 31, 2025 at 4:48 PM CET, Andrew Dunstan wrote:
> I'd kinda like to unify these universes, though. We could import the
> pgperltidy logic into pgindent but disable it unless some flag were
> given and the correct version of perltidy were present.

Attached is an initial patchset that does that, as well as improving
pgindent in various other ways. This has removed the make/meson
integration and instead made pgindent smarter at finding pg_bsd_indent
and perltidy. I believe that with all of these QoL improvements we could
enable perltidy in pgindent by default (after doing a full indent run).

I want to call pretty much all of this code was written by Claude Code
(i.e. an AI). I plan to do another review pass over this code soonish.
Especially the later commits, which I haven't checked in detail yet.
But for now I at least wanted to share the direction of what I've been
working on, because I saw that Peter marked himself as reviewer on the
commitfest app and I don't think it makes sense for him to look at the
previous patchset.

Attachment Content-Type Size
v2-0001-pgindent-Clean-up-temp-files-on-SIGINT.patch text/x-patch 958 bytes
v2-0002-pgindent-Try-to-find-pg_bsd_indent-binary-in-comm.patch text/x-patch 2.1 KB
v2-0003-pgindent-Integrate-pgperltidy-functionality-into-.patch text/x-patch 11.5 KB
v2-0004-pgindent-Use-git-ls-files-to-discover-files.patch text/x-patch 2.1 KB
v2-0005-pgindent-Default-to-indenting-the-current-directo.patch text/x-patch 1.1 KB
v2-0006-pgindent-Add-easy-way-of-getting-perltidy.patch text/x-patch 5.9 KB
v2-0007-pgindent-Allow-parallel-pgindent-runs.patch text/x-patch 5.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-03-04 09:19:07 Re: Skipping schema changes in publication
Previous Message Alexander Lakhin 2026-03-04 09:00:00 Re: BUG: Former primary node might stuck when started as a standby