Re: [HACKERS] perlcritic - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] perlcritic
Date
Msg-id 19d79f8c-9c4e-c491-ca8f-7384dce71fb6@2ndquadrant.com
Whole thread Raw
In response to perlcritic  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: [HACKERS] perlcritic  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
List pgsql-hackers
I posted this about 18 months ago but then ran out of steam.  In the
meantime, some people have been going around doing various Perl code
cleanups in parts of the code, so it seems it makes sense to proceed
with this.  We use "use strict" everywhere now, so some of the original
patch has gone away.  Here is an updated patch.  The testing
instructions below still apply.  Especially welcome would be ideas on
how to address some of the places I have marked with ## no critic.

On 8/31/15 23:57, Peter Eisentraut wrote:
> We now have 80+ Perl files in our tree, and it's growing.  Some of those
[actually >=117 now]
> files were originally written for Perl 4, and the coding styles and
> quality are quite, uh, divergent.  So I figured it's time to clean up
> that code a bit.  I ran perlcritic over the tree and cleaned up all the
> warnings at level 5 (the default, least severe).
> 
> Testing guidelines:
> 
> - Many files are part of the regular build or test process.
> 
> - msvc files need to be tested separately.  I tested as best as I could
> on a non-Windows system.
> 
> - There are a couple of one-offs in contrib and src/test that need to be
> run manually.
> 
> - The stuff under utils/mb/Unicode/
[has already been cleaned up separately]

> To install perlcritic, run
> 
>     cpan -i Perl::Critic
> 
> and then run
> 
>     perlcritic .
> 
> at the top of the tree (or a subdirectory).

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Performance degradation in TPC-H Q18
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] Performance degradation in TPC-H Q18