aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-03-19 07:01:22 +0100
committerPeter Eisentraut <peter@eisentraut.org>2024-03-19 07:09:31 +0100
commitd56cb42b54381d414f1f30929ca267e4768313c8 (patch)
treeaf3376a5ecf97ed9c2a0bc5a1c6716e6ecae5635 /doc/src
parentbb5604ba9e53e3a0fb9967f960e36cff4d36b0ab (diff)
downloadpostgresql-d56cb42b54381d414f1f30929ca267e4768313c8.tar.gz
postgresql-d56cb42b54381d414f1f30929ca267e4768313c8.zip
Activate perlcritic InputOutput::RequireCheckedSyscalls and fix resulting warnings
This checks that certain I/O-related Perl functions properly check their return value. Some parts of the PostgreSQL code had been a bit sloppy about that. The new perlcritic warnings are fixed here. I didn't design any beautiful error messages, mostly just used "or die $!", which mostly matches existing code, and also this is developer-level code, so having the system error plus source code reference should be ok. Initially, we only activate this check for a subset of what the perlcritic check would warn about. The effective list is chmod flock open read rename seek symlink system The initial set of functions is picked because most existing code already checked the return value of those, so any omissions are probably unintended, or because it seems important for test correctness. The actual perlcritic configuration is written as an exclude list. That seems better so that we are clear on what we are currently not checking. Maybe future patches want to investigate checking some of the other functions. (In principle, we might eventually want to check all of them, but since this is test and build support code, not production code, there are probably some reasonable compromises to be made.) Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Discussion: https://www.postgresql.org/message-id/flat/88b7d4f2-46d9-4cc7-b1f7-613c90f9a76a%40eisentraut.org
Diffstat (limited to 'doc/src')
0 files changed, 0 insertions, 0 deletions