Re: perlcritic: prohibit map and grep in void conext

2021-08-31 Thread Dagfinn Ilmari Mannsåker
On Tue, 31 Aug 2021, at 10:30, Daniel Gustafsson wrote: > > On 31 Aug 2021, at 06:19, Julien Rouhaud wrote: > > > > On Tue, Aug 31, 2021 at 9:23 AM Michael Paquier wrote: > >> > >> On Mon, Aug 30, 2021 at 02:27:09PM -0400, Andrew Dunstan wrote: > >>> There doesn't seem to have been much

Re: perlcritic: prohibit map and grep in void conext

2021-08-31 Thread Daniel Gustafsson
> On 31 Aug 2021, at 06:19, Julien Rouhaud wrote: > > On Tue, Aug 31, 2021 at 9:23 AM Michael Paquier wrote: >> >> On Mon, Aug 30, 2021 at 02:27:09PM -0400, Andrew Dunstan wrote: >>> There doesn't seem to have been much pushback, so let's try it and see. >> >> Okay, fine by me. > > +1 Since

Re: perlcritic: prohibit map and grep in void conext

2021-08-30 Thread Julien Rouhaud
On Tue, Aug 31, 2021 at 9:23 AM Michael Paquier wrote: > > On Mon, Aug 30, 2021 at 02:27:09PM -0400, Andrew Dunstan wrote: > > There doesn't seem to have been much pushback, so let's try it and see. > > Okay, fine by me. +1

Re: perlcritic: prohibit map and grep in void conext

2021-08-30 Thread Michael Paquier
On Mon, Aug 30, 2021 at 02:27:09PM -0400, Andrew Dunstan wrote: > There doesn't seem to have been much pushback, so let's try it and see. Okay, fine by me. -- Michael signature.asc Description: PGP signature

Re: perlcritic: prohibit map and grep in void conext

2021-08-30 Thread Andrew Dunstan
On 8/27/21 6:32 AM, Dagfinn Ilmari Mannsåker wrote: > Michael Paquier writes: > >> On Wed, Jul 28, 2021 at 01:26:23PM +0200, Daniel Gustafsson wrote: >>> 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

Re: perlcritic: prohibit map and grep in void conext

2021-08-27 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Wed, Jul 28, 2021 at 01:26:23PM +0200, Daniel Gustafsson wrote: >> 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

Re: perlcritic: prohibit map and grep in void conext

2021-08-27 Thread Daniel Gustafsson
> On 27 Aug 2021, at 08:10, Michael Paquier wrote: > > On Wed, Jul 28, 2021 at 01:26:23PM +0200, Daniel Gustafsson wrote: >> 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

Re: perlcritic: prohibit map and grep in void conext

2021-08-27 Thread Michael Paquier
On Wed, Jul 28, 2021 at 01:26:23PM +0200, Daniel Gustafsson wrote: > 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. I have no issue

Re: perlcritic: prohibit map and grep in void conext

2021-08-07 Thread Dagfinn Ilmari Mannsåker
ilm...@ilmari.org (Dagfinn Ilmari Mannsåker) writes: > 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: >

Re: perlcritic: prohibit map and grep in void conext

2021-07-28 Thread Daniel Gustafsson
> On 28 Jul 2021, at 13:10, Andrew Dunstan 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

Re: perlcritic: prohibit map and grep in void conext

2021-07-28 Thread Andrew Dunstan
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: >

Re: perlcritic: prohibit map and grep in void conext

2021-07-27 Thread Michael Paquier
On Tue, Jul 27, 2021 at 09:09:10PM +0200, Daniel Gustafsson wrote: > On 27 Jul 2021, at 18:06, Dagfinn Ilmari Mannsåker wrote: >> 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

Re: perlcritic: prohibit map and grep in void conext

2021-07-27 Thread Daniel Gustafsson
> On 27 Jul 2021, at 18:06, Dagfinn Ilmari Mannsåker wrote: > 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. +1, the use of foreach also improves readability

perlcritic: prohibit map and grep in void conext

2021-07-27 Thread Dagfinn Ilmari Mannsåker
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