From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pg_createsubscriber TAP test wrapping makes command options hard to read. |
Date: | 2024-12-12 03:53:13 |
Message-ID: | Z1peKSb8roiDNgRj@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Dec 12, 2024 at 02:13:40PM +1100, Peter Smith wrote:
> TBH, I have no idea what logic perltidy uses. I did find some
> configurations here [1] (are those what it pgperltidy uses?) but those
> claim max line length is 78 which I didn't come anywhere near
> exceeding.
Gave up trying to understand its internals and its rules years ago.
It's complicated enough that we require a specific version of the tool
for the tree with a custom PATH :D
> After some more experimentation, I've noticed that it is trying to
> keep only 2 items on each line. So whether it looks good or not seems
> to depend if there is an even or odd number of options without
> arguments up-front. Maybe those perltidy "tightness" switches?
Don't recall so even under Perl-Tidy-20230309, because it comes down
to the number of elements in these arrays and the length of their
values, not the specific values in each element of the array.
> So, AFAICT I can workaround the perltidy wrapping just by putting all
> the noarg options at the bottom of the command, then all the
> option/optarg pairs (ie 2s) will stay together. I can post another
> patch to do it this way unless you think it is too hacky.
This trick works for me if that makes the long list of option easier
to read. With two elements of the array perl line, I would just put
some --dry-run or --verbose at the end of their respective arrays.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2024-12-12 04:04:19 | Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility. |
Previous Message | Corey Huinker | 2024-12-12 03:49:53 | Re: Statistics Import and Export |