Re: pgsql: Fix perltidy breaking perlcritic

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: pgsql: Fix perltidy breaking perlcritic
Дата
Msg-id CAD5tBcLLAvZO_x9X0=NePodXJCMowC8ieBAa6t_a0SeUu+rrfA@mail.gmail.com
обсуждение исходный текст
Ответ на pgsql: Fix perltidy breaking perlcritic  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: pgsql: Fix perltidy breaking perlcritic  (John Naylor <john.naylor@enterprisedb.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Choose FK name correctly during partition attachment
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Add more error context to RestoreBlockImage() and consume it