perlcritic: prohibit map and grep in void conext

From: ilmari(at)ilmari(dot)org (Dagfinn Ilmari Mannsåker )
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: perlcritic: prohibit map and grep in void conext
Date: 2021-07-27 16:06:19
Message-ID: 87fsvzhhc4.fsf@wibble.ilmari.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

In the patches for improving the MSVC build process, I noticed a use of
`map` in void context. This is considered bad form, and has a
perlcritic policy forbidding it:
https://metacpan.org/pod/Perl::Critic::Policy::BuiltinFunctions::ProhibitVoidMap.

Attached is a patch that increases severity of that and the
corresponding `grep` policy to 5 to enable it in our perlcritic policy,
and fixes the one use that had already snuck in.

- ilmari

Attachment Content-Type Size
0001-perlcritic-prohibit-map-and-grep-in-void-context.patch text/x-diff 1.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2021-07-27 16:07:54 Re: a thinko in b676ac443b6
Previous Message John Naylor 2021-07-27 16:05:51 Re: truncating timestamps on arbitrary intervals