From: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
---|---|
To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, 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 12:04:16 |
Message-ID: | 87pllx5cqn.fsf@wibble.ilmari.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Smith <smithpb2250(at)gmail(dot)com> writes:
> On Thu, Dec 12, 2024 at 2:53 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> ...
>
>> > 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
>
> Hi Michael.
>
> Yes, that is the workaround that I was proposing.
A better option, IMO, is to use the fat comma (=>) between options and
their values. This makes it clear both to humans and perltidy that they
belong together, and we can put all the valueless options first without
things being rewrapped.
- ilmari
Attachment | Content-Type | Size |
---|---|---|
v3-0001-Modify-wrapping-to-make-command-options-easier-to.patch | text/x-diff | 7.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2024-12-12 12:09:26 | Re: [PoC] Reducing planning time when tables have many partitions |
Previous Message | Daniel Gustafsson | 2024-12-12 11:58:48 | Re: Replace current implementations in crypt() and gen_salt() to OpenSSL |