public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: Peter Smith <[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 12:53:13 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAHut+PvFGytgJT+K_e2x+uWKuVYCBR3HNaNtPKYEkO3YxAwZvw@mail.gmail.com>
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>

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


Attachments:

  [application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
  download

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]
  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