Re: pgsql: Fix perltidy breaking perlcritic - Mailing list pgsql-committers

From Andrew Dunstan
Subject Re: pgsql: Fix perltidy breaking perlcritic
Date
Msg-id CAD5tBcLLAvZO_x9X0=NePodXJCMowC8ieBAa6t_a0SeUu+rrfA@mail.gmail.com
Whole thread Raw
In response to pgsql: Fix perltidy breaking perlcritic  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: pgsql: Fix perltidy breaking perlcritic  (John Naylor <john.naylor@enterprisedb.com>)
List pgsql-committers


On Thu, Sep 8, 2022 at 5:23 AM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
Fix perltidy breaking perlcritic

perltidying a "##no critic" line moves the marker to where it becomes
useless.  Put the line back to how it was, and protect it from further
malfeasance.



A better way do do this IMNSHO is to put the eval in a block on its own along with the no critic marker on its own line, like this:

{
   ## no critic (ProhibitStringyEval)
   eval ...
}

perlcritic respects block boundaries for its directives.

cheers

andrew

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Choose FK name correctly during partition attachment
Next
From: Michael Paquier
Date:
Subject: pgsql: Add more error context to RestoreBlockImage() and consume it