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

From Daniel Gustafsson
Subject Re: perlcritic: prohibit map and grep in void conext
Date
Msg-id 8B793436-CB3B-469F-9034-DED161BB96B8@yesql.se
Whole thread Raw
In response to Re: perlcritic: prohibit map and grep in void conext  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
> On 28 Jul 2021, at 13:10, Andrew Dunstan <andrew@dunslane.net> wrote:
>
> 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'm fine with increasing this policy, but I don't have strong feelings.  If we
feel the perlcritic policy change is too much, I would still prefer to go ahead
with the map rewrite part of the patch though.

--
Daniel Gustafsson        https://vmware.com/




pgsql-hackers by date:

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