Re: run pgindent in CI

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: run pgindent in CI
Date: 2026-09-23 12:55:10
Message-ID: 02c15786-319f-4136-a245-b63d61bcc7a2@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22.09.26 16:04, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> On 2026-09-22 Tu 3:10 AM, Peter Eisentraut wrote:
>>> One surprise from this is that this generates a massive pgindent diff
>>> against the current tree, because there are a bunch of entries missing
>>> or wrong in src/tools/pgindent/exclude_file_patterns.  I guess most
>>> people don't see this because these are mostly generated files, which
>>> would get reindented but then ignored via gitignore, but if you run
>>> pgindent --check --diff, then this will show up.
>
>> [koel] just runs:
>>    src/tools/pgindent/pgindent --diff --check .
>> Of course, that's against a pure source tree.
>
> Yeah, I generally run pgindent against a clean tree as well. We have
> made some efforts to make generated files be pgindent-clean, but
> it's been pretty haphazard, and I doubt we want to make a project
> policy requiring that. So really the right thing is to make this
> CI module do likewise.

For clarification: We already have a exclude_file_patterns that
excludes many generated files. It just didn't exclude enough of them.
Things were just forgotten. So this proposal is not introducing a new
policy or requirement, it just fixes things so that the implementation
of the current apparent policy is complete.

We could also desupport running pgindent in a tree with both sources and
built files. But then we should do that explicitly and remove the
leftover support for that. However, I wouldn't be in favor of that
unless we desupported in-tree (non-vpath) builds altogether. In any
case, a patch to complete the exclude_file_patterns list for the time
being does exist, so this does not have to be decided urgently.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2026-09-23 12:57:03 Re: run pgindent in CI
Previous Message Zsolt Parragi 2026-09-23 12:51:31 Re: SSI: ON CONFLICT DO SELECT takes no predicate lock on the returned row