From: | Daniel Gustafsson <dgustafsson(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Prohibit map and grep in void context |
Date: | 2021-08-31 09:28:11 |
Message-ID: | E1mL03v-0000Ns-CM@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Prohibit map and grep in void context
map and grep are not intended to be used as mutators, iterating
with side-effects should be done with for or foreach loops. This
fixes the one occurrence of the pattern, and bumps the perlcritic
policy to severity 5 for the map and grep policies.
Author: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Reviewed-by: Michael Paquier <michael(at)paquier(dot)xyz>
Reviewed-by: Andrew Dunstan <andrew(at)dunslane(dot)net>
Reviewed-by: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Discussion: https://postgr.es/m/87fsvzhhc4.fsf@wibble.ilmari.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/bb466c6b0992a1a21c03239a7b0a87ebadd3bee1
Modified Files
--------------
contrib/intarray/bench/create_test.pl | 2 +-
src/tools/perlcheck/perlcriticrc | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2021-08-31 09:50:04 | Re: Separate out FileSet from SharedFileSet (was Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o) |
Previous Message | Dilip Kumar | 2021-08-31 05:53:16 | Re: Separate out FileSet from SharedFileSet (was Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o) |