Re: pgsql: Fix perltidy breaking perlcritic

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix perltidy breaking perlcritic
Date: 2022-09-08 20:32:14
Message-ID: CAD5tBcLLAvZO_x9X0=NePodXJCMowC8ieBAa6t_a0SeUu+rrfA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Sep 8, 2022 at 5:23 AM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2022-09-09 01:02:07 pgsql: Add more error context to RestoreBlockImage() and consume it
Previous Message Tom Lane 2022-09-08 18:50:56 Re: pgsql: Choose FK name correctly during partition attachment

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-09-08 21:24:57 Re: Adding CommandID to heap xlog records
Previous Message Peter Geoghegan 2022-09-08 20:23:52 Re: New strategies for freezing, advancing relfrozenxid early