pgsql: Prohibit map and grep in void context

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема pgsql: Prohibit map and grep in void context
Дата
Msg-id E1mL03v-0000Ns-CM@gemulon.postgresql.org
обсуждение исходный текст
Список 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@ilmari.org>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Andrew Dunstan <andrew@dunslane.net>
Reviewed-by: Julien Rouhaud <rjuju123@gmail.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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Add tab completion for data types after ALTER TABLE ADD [COLUMN]
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix missed lock acquisition while inlining new-style SQL functio