public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andrew Dunstan <[email protected]>
To: Dagfinn Ilmari Mannsåker <[email protected]>
To: Peter Smith <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: pg_createsubscriber TAP test wrapping makes command options hard to read.
Date: Thu, 12 Dec 2024 10:28:38 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAHut+PvfaUZQR3rEnj-Dcg_6713Wu4yRdd-yZkkC9NVsARht8A@mail.gmail.com>
<[email protected]>
<CAHut+Ps6Q+i_3xS6H7ybw3-hx9+2QOuneTJwHArxqxFnKX5+4g@mail.gmail.com>
<[email protected]>
<CAHut+PvFGytgJT+K_e2x+uWKuVYCBR3HNaNtPKYEkO3YxAwZvw@mail.gmail.com>
<[email protected]>
<CAHut+PvYsVhF5k-mYHVEFdpijdgkYRtoeWVxdspxio0ePRpkug@mail.gmail.com>
<[email protected]>
<[email protected]>
On 2024-12-12 Th 8:17 AM, Dagfinn Ilmari Mannsåker wrote:
> Dagfinn Ilmari Mannsåker<[email protected]> writes:
>
>> Peter Smith<[email protected]> writes:
>>
>>> On Thu, Dec 12, 2024 at 2:53 PM Michael Paquier<[email protected]> 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.
> Here's a more thorough patch, that also applies the fat comma treatment
> to other pg_createsubscriber invocations in the same file that don't
> currently happen to be mangled by perltidy. It also adds trailing
> commas to the last item in multi-line command arrays, which is common
> perl style.
>
+1 for this approach.
cheers
andrew
--
Andrew Dunstan
EDB:https://www.enterprisedb.com
view thread (20+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: pg_createsubscriber TAP test wrapping makes command options hard to read.
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox