Re: perlcritic and perltidy - Mailing list pgsql-hackers

From Tom Lane
Subject Re: perlcritic and perltidy
Date
Msg-id 9549.1525622014@sss.pgh.pa.us
Whole thread Raw
In response to perlcritic and perltidy  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Responses Re: perlcritic and perltidy  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Re: perlcritic and perltidy  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
> The attached patch allows a clean run from the following script adapted
> from pgperltidy:

I'm hardly a perl expert, but those changes look reasonable.

> w.r.t. perltidy, I note that our policy has these two lines:
>     --vertical-tightness=2
>     --vertical-tightness-closing=2
> I've been looking at syncing the buildfarm client with our core code
> perltidy settings. However, I don't actually like these two and I've
> decided to exercise some editorial discretion and not use them.

Okay ...

> Note that the perltidy man page does suggest that these can make things
> less readable, and it also states unequivocally "You must also use the
> -lp flag when you use the -vt flag". That is the --line-up-parentheses
> flag and it's something we don't use. Enabling it would generate about
> 12k lines of diff.

What sort of changes do we get if we remove those two flags as you prefer?
It'd help to see some examples.

Since we just went to a new perltidy version, and made some other
policy changes for it, in HEAD, it'd make sense to make any further
changes in this same release cycle rather than drip drip drip over
multiple cycles.  We just need to get some consensus about what
style we like.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Yura Sokolov
Date:
Subject: Re: [HACKERS] Clock with Adaptive Replacement
Next
From: Andrew Dunstan
Date:
Subject: Re: perlcritic and perltidy