Re: perlcritic: prohibit map and grep in void conext - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: perlcritic: prohibit map and grep in void conext
Date
Msg-id 8aa32735-a310-e5b9-cdd4-1282b72ae8f3@dunslane.net
Whole thread Raw
In response to perlcritic: prohibit map and grep in void conext  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
Responses Re: perlcritic: prohibit map and grep in void conext  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
On 7/27/21 12:06 PM, Dagfinn Ilmari Mannsåker wrote:
> 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.
>


Personally I'm OK with it, but previous attempts to enforce perlcritic
policies have met with a less than warm reception, and we had to back
off. Maybe this one will fare better.

I keep the buildfarm code perlcritic compliant down to severity 3 with a
handful of exceptions.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: Amul Sul
Date:
Subject: Re: [Patch] ALTER SYSTEM READ ONLY
Next
From: Andrew Dunstan
Date:
Subject: Re: Out-of-memory error reports in libpq