Re: perlcritic and perltidy

2018-05-27 Thread Andrew Dunstan
On 05/25/2018 03:04 PM, Bruce Momjian wrote: On Sun, May 6, 2018 at 11:53:34AM -0400, Tom Lane wrote: 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 fo

Re: perlcritic and perltidy

2018-05-25 Thread Bruce Momjian
On Sun, May 6, 2018 at 11:53:34AM -0400, Tom Lane wrote: > 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 a

Re: perlcritic and perltidy

2018-05-08 Thread Stephen Frost
Andrew, * Andrew Dunstan (andrew.duns...@2ndquadrant.com) wrote: > On 05/08/2018 01:18 PM, Stephen Frost wrote: > > * Andrew Dunstan (andrew.duns...@2ndquadrant.com) wrote: > >> On 05/08/2018 12:51 PM, Stephen Frost wrote: > >>> * Andrew Dunstan (andrew.duns...@2ndquadrant.com) wrote: > >>> There'

Re: perlcritic and perltidy

2018-05-08 Thread Andrew Dunstan
On 05/08/2018 01:18 PM, Stephen Frost wrote: > Andrew, > > * Andrew Dunstan (andrew.duns...@2ndquadrant.com) wrote: >> On 05/08/2018 12:51 PM, Stephen Frost wrote: >>> * Andrew Dunstan (andrew.duns...@2ndquadrant.com) wrote: >>> There's not much point adding the ',' unless you're also putting the

Re: perlcritic and perltidy

2018-05-08 Thread Stephen Frost
Andrew, * Andrew Dunstan (andrew.duns...@2ndquadrant.com) wrote: > On 05/08/2018 12:51 PM, Stephen Frost wrote: > > * Andrew Dunstan (andrew.duns...@2ndquadrant.com) wrote: > > There's not much point adding the ',' unless you're also putting the > > ');' on the next line, is there..? > > No, not

Re: perlcritic and perltidy

2018-05-08 Thread Andrew Dunstan
On 05/08/2018 12:51 PM, Stephen Frost wrote: > Greetings, > > * Andrew Dunstan (andrew.duns...@2ndquadrant.com) wrote: >> On 05/08/2018 10:06 AM, Andrew Dunstan wrote: >>> { find . -type f -a \( -name >>> '*.pl' -o -name '*.pm' \) -print; find . -type f -perm -100 >>> -exec file {

Re: perlcritic and perltidy

2018-05-08 Thread Stephen Frost
Greetings, * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > Stephen Frost wrote: > > > * Andrew Dunstan (andrew.duns...@2ndquadrant.com) wrote: > > > > > - 'XLogRecPtr'=> 'pg_lsn'); > > > + 'XLogRecPtr'=> 'pg_lsn',); > > > > There's not much point adding the ',' unless

Re: perlcritic and perltidy

2018-05-08 Thread Alvaro Herrera
Stephen Frost wrote: > * Andrew Dunstan (andrew.duns...@2ndquadrant.com) wrote: > > > - 'XLogRecPtr'=> 'pg_lsn'); > > + 'XLogRecPtr'=> 'pg_lsn',); > > There's not much point adding the ',' unless you're also putting the > ');' on the next line, is there..? > > Or is th

Re: perlcritic and perltidy

2018-05-08 Thread Stephen Frost
Greetings, * Andrew Dunstan (andrew.duns...@2ndquadrant.com) wrote: > On 05/08/2018 10:06 AM, Andrew Dunstan wrote: > > { find . -type f -a \( -name > > '*.pl' -o -name '*.pm' \) -print; find . -type f -perm -100 > > -exec file {} \; -print    | egrep -i > > ':.*perl[0-

Re: perlcritic and perltidy

2018-05-08 Thread Andrew Dunstan
On 05/08/2018 10:06 AM, Andrew Dunstan wrote: > { find . -type f -a \( -name > '*.pl' -o -name '*.pm' \) -print; find . -type f -perm -100 > -exec file {} \; -print    | egrep -i > ':.*perl[0-9]*\>'    | cut -d: -f1; } | sort -u  | > xargs perlcriti

Re: perlcritic and perltidy

2018-05-08 Thread Peter Eisentraut
On 5/8/18 11:39, Alvaro Herrera wrote: > Andrew Dunstan wrote: > >> Yes. there are separate settings for the three types of brackets. Here's >> what happens if we restrict the vertical tightness settings to parentheses. >> >> I think that's an unambiguous improvement. > > LGTM. Yes, that looks b

Re: perlcritic and perltidy

2018-05-08 Thread Alvaro Herrera
Andrew Dunstan wrote: > Yes. there are separate settings for the three types of brackets. Here's > what happens if we restrict the vertical tightness settings to parentheses. > > I think that's an unambiguous improvement. LGTM. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ Post

Re: perlcritic and perltidy

2018-05-08 Thread Andrew Dunstan
On 05/08/2018 08:31 AM, David Steele wrote: > On 5/8/18 8:11 AM, Stephen Frost wrote: >> Greetings, >> >> * Michael Paquier (mich...@paquier.xyz) wrote: >>> On Sun, May 06, 2018 at 09:14:06PM -0400, Stephen Frost wrote: While I appreciate the support, I'm not sure that you're actually a

Re: perlcritic and perltidy

2018-05-08 Thread David Steele
On 5/8/18 8:11 AM, Stephen Frost wrote: > Greetings, > > * Michael Paquier (mich...@paquier.xyz) wrote: >> On Sun, May 06, 2018 at 09:14:06PM -0400, Stephen Frost wrote: >>> While I appreciate the support, I'm not sure that you're actually >>> agreeing with me.. I was arguing that braces should b

Re: perlcritic and perltidy

2018-05-08 Thread Stephen Frost
Greetings, * Michael Paquier (mich...@paquier.xyz) wrote: > On Sun, May 06, 2018 at 09:14:06PM -0400, Stephen Frost wrote: > > While I appreciate the support, I'm not sure that you're actually > > agreeing with me.. I was arguing that braces should be on their own > > line and therefore there wou

Re: perlcritic and perltidy

2018-05-08 Thread Peter Eisentraut
On 5/6/18 12:13, Andrew Dunstan wrote: > Essentially it adds some vertical whitespace to structures so that the > enclosing braces etc appear on their own lines. A very typical change > looks like this: > > - { code  => $code, > + { > +   code  => $code,

Re: perlcritic and perltidy

2018-05-07 Thread Michael Paquier
On Sun, May 06, 2018 at 09:14:06PM -0400, Stephen Frost wrote: > While I appreciate the support, I'm not sure that you're actually > agreeing with me.. I was arguing that braces should be on their own > line and therefore there would be a new line for the brace. > Specifically, when moving lines b

Re: perlcritic and perltidy

2018-05-06 Thread Stephen Frost
Michael, * Michael Paquier (mich...@paquier.xyz) wrote: > On Sun, May 06, 2018 at 01:46:28PM -0400, Stephen Frost wrote: > > I definitely prefer to have the braces on their own line- makes working > > with the files a lot easier when you've got a lot of hashes > > (particularly thinking about the

Re: perlcritic and perltidy

2018-05-06 Thread Michael Paquier
On Sun, May 06, 2018 at 01:46:28PM -0400, Stephen Frost wrote: > I definitely prefer to have the braces on their own line- makes working > with the files a lot easier when you've got a lot of hashes > (particularly thinking about the hashes for the pg_dump regression > tests..). Having them on ind

Re: perlcritic and perltidy

2018-05-06 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Andrew Dunstan writes: > > On 05/06/2018 11:53 AM, Tom Lane wrote: > >> What sort of changes do we get if we remove those two flags as you prefer? > >> It'd help to see some examples. > > > Essentially it adds some vertical whitespace to struct

Re: perlcritic and perltidy

2018-05-06 Thread Tom Lane
Andrew Dunstan writes: > On 05/06/2018 11:53 AM, Tom Lane wrote: >> What sort of changes do we get if we remove those two flags as you prefer? >> It'd help to see some examples. > Essentially it adds some vertical whitespace to structures so that the > enclosing braces etc appear on their own lin

Re: perlcritic and perltidy

2018-05-06 Thread Tom Lane
Andrew Dunstan 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-