mirror of
https://github.com/postgres/postgres.git
synced 2025-12-19 17:02:53 +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:
@@ -30,7 +30,7 @@ compare the results of cross-version upgrade tests.
|
||||
package PostgreSQL::Test::AdjustUpgrade;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use Exporter 'import';
|
||||
use PostgreSQL::Version;
|
||||
|
||||
@@ -54,7 +54,7 @@ initiated by PostgreSQL::Test::Cluster.
|
||||
package PostgreSQL::Test::BackgroundPsql;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use Carp;
|
||||
use Config;
|
||||
|
||||
@@ -97,7 +97,7 @@ The IPC::Run module is required.
|
||||
package PostgreSQL::Test::Cluster;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use Carp;
|
||||
use Config;
|
||||
|
||||
@@ -19,7 +19,7 @@ PostgreSQL::Test::RecursiveCopy::copypath($from, $to);
|
||||
package PostgreSQL::Test::RecursiveCopy;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use Carp;
|
||||
use File::Basename;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
package PostgreSQL::Test::SimpleTee;
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use Time::HiRes qw(time);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ aimed at controlling command execution, logging and test functions.
|
||||
package PostgreSQL::Test::Utils;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use Carp;
|
||||
use Config;
|
||||
|
||||
@@ -45,7 +45,7 @@ of common version formats and comparison operations.
|
||||
package PostgreSQL::Version;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
|
||||
use Scalar::Util qw(blessed);
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ order.
|
||||
Each test script should begin with:
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use warnings FATAL => 'all';
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
use Test::More;
|
||||
|
||||
Reference in New Issue
Block a user