On 13.03.26 09:29, Jelte Fennema-Nio wrote:
On Thu Mar 12, 2026 at 10:10 AM CET, Peter Eisentraut wrote:
Apparently, this is still work in progress, but here are some comments from me.

Thanks for the review. I went over the code in detail now myself, and
haven't found anything hugehely weird (although I did a bit of cleanup
and additional comments). As said before I'm definetly not a Perl expert
though, so I might have missed some wrong details. But all the logic at least
seems sound.

I also reorderd the commits to have the perltidy integration as the last
ones, and the general pgindent QoL imorovements first.

v3-0001-pgindent-Clean-up-temp-files-created-by-File-Temp.patch
v3-0002-pgindent-Always-clean-up-.BAK-files-from-pg_bsd_i.patch

I have committed these two.

v3-0003-pgindent-Use-git-ls-files-to-discover-files.patch

This looks structurally correct, but I wonder whether this:

    my @git_files = `git ls-files -- @dirs`;

could be written in a way that is more robust against funny file names. (pgindent is also used against trees that are not stock PostgreSQL.)

v3-0004-pgindent-Default-to-indenting-the-current-directo.patch

Note that other tools also share this behavior with pgindent:

src/tools/pgindent/pgperltidy
src/tools/perlcheck/pgperlcritic
src/tools/perlcheck/pgperlsyncheck

If we change one, we should change all.

It might be that the current behavior is intentional for some nonobvious reason, not sure.

v3-0005-pgindent-Allow-parallel-pgindent-runs.patch
v3-0006-pgindent-Try-to-find-pg_bsd_indent-binary-in-comm.patch
v3-0007-pgindent-Integrate-pgperltidy-functionality-into-.patch
v3-0008-pgindent-Add-easy-way-of-getting-perltidy.patch

Still need to check these in more detail. They will probably carry over into PG20.



Reply via email to