mirror of
https://github.com/postgres/postgres.git
synced 2025-12-24 06:01:07 +03:00
Make all Perl warnings fatal
There are a lot of Perl scripts in the tree, mostly code generation
and TAP tests. Occasionally, these scripts produce warnings. These
are probably always mistakes on the developer side (true positives).
Typical examples are warnings from genbki.pl or related when you make
a mess in the catalog files during development, or warnings from tests
when they massage a config file that looks different on different
hosts, or mistakes during merges (e.g., duplicate subroutine
definitions), or just mistakes that weren't noticed because there is a
lot of output in a verbose build.
This changes all warnings into fatal errors, by replacing
use warnings;
by
use warnings FATAL => 'all';
in all Perl files.
Discussion: https://www.postgresql.org/message-id/flat/06f899fd-1826-05ab-42d6-adeb1fd5e200%40eisentraut.org
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
# Test CREATE INDEX CONCURRENTLY with concurrent modifications
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
# Test CREATE INDEX CONCURRENTLY with concurrent prepared-xact modifications
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# presence of breaking sort order changes.
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
use Test::More;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# Test integrity of intermediate states by PITR to those states
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
use Test::More;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
# Test generic xlog record work for bloom index replication.
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
use Test::More;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
die "Usage: $0 OUTPUT_FILE\n" if @ARGV != 1;
|
||||
my $output_file = $ARGV[0];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
# make sure we are in a sane environment.
|
||||
use DBI();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# contrib/intarray/bench/create_test.pl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
print <<EOT;
|
||||
create table message (
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use PostgreSQL::Test::Utils;
|
||||
use Test::More;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
my $integer = '[+-]?[0-9]+';
|
||||
my $real = '[+-]?[0-9]+\.[0-9]+';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# this script will sort any table with the segment data type in its last column
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
my @rows;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Test replication statistics data in pg_stat_replication_slots is sane after
|
||||
# drop replication slot and restart.
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
use File::Path qw(rmtree);
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use PostgreSQL::Test::Utils;
|
||||
use Test::More;
|
||||
|
||||
Reference in New Issue
Block a user