forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbb466c6
committed
Prohibit map and grep in void context
map and grep are not intended to be used as mutators, iteratingwith side-effects should be done with for or foreach loops. Thisfixes the one occurrence of the pattern, and bumps the perlcriticpolicy 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.org1 parentf2bbadc commitbb466c6
File tree
2 files changed
+8
-1
lines changed- contrib/intarray/bench
- src/tools/perlcheck
2 files changed
+8
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
54 |
| - | |
| 54 | + | |
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + |
0 commit comments
Comments
(0)