pgsql: Prohibit map and grep in void context - Mailing list pgsql-committers

From Daniel Gustafsson
Subject pgsql: Prohibit map and grep in void context
Date
Msg-id [email protected]
Whole thread Raw
List 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 <[email protected]>
Reviewed-by: Michael Paquier <[email protected]>
Reviewed-by: Andrew Dunstan <[email protected]>
Reviewed-by: Julien Rouhaud <[email protected]>
Discussion: https://postgr.es/m/[email protected]

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(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Add tab completion for data types after ALTER TABLE ADD [COLUMN]
Next
From: Tom Lane
Date:
Subject: pgsql: Fix missed lock acquisition while inlining new-style SQL functio