From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: perlcritic |
Date: | 2017-03-01 03:58:06 |
Message-ID: | 19d79f8c-9c4e-c491-ca8f-7384dce71fb6@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Clean-up-Perl-code-according-to-perlcritic-severi.patch | text/x-patch | 62.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2017-03-01 04:02:22 | Re: Performance degradation in TPC-H Q18 |
Previous Message | Robert Haas | 2017-03-01 03:51:47 | Re: Performance degradation in TPC-H Q18 |