On Thu, Dec 12, 2024 at 12:41 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Peter Smith <smithpb2250@gmail.com> writes:
> > While reviewing a patch for another pg_createsubscriber thread I found
> > that multiple TAP tests have a terrible wrapping where the command
> > options and their associated oparg are separated on different lines
> > instead of paired together nicely. This makes it unnecessarily
> > difficult to see what the test is doing.
>
> I think that is mostly the fault of pgperltidy. We did change
> the options we use with it awhile back, so maybe now it will honor
> your manual changes to its line-wrapping choices. But I wouldn't
> bet on that. Did you check what happens if you run the modified
> code through pgperltidy?
>
> (If the answer is bad, we could look into making further changes so
> that pgperltidy won't override these decisions. But there's no point
> in manually patching this if it'll just get undone.)
>
Thanks for your suggestion. As you probably suspected, the answer is bad.
I ran pgperltidy on the "fixed" file:
[postgres@CentOS7-x64 oss_postgres_misc]$
src/tools/pgindent/pgperltidy
src/bin/pg_basebackup/t/040_pg_createsubscriber.pl
This reverted it to how it currently looks on master.
The strange thing is there are other commands in that file very
similar to the ones I had changed but those already looked good, yet
they remained unaffected by the pgperltidy. Why?
======
Kind Regards,
Peter Smith.
Fujitsu Australia