mirror of
https://github.com/postgres/postgres.git
synced 2025-08-19 23:22:23 +03:00
Use perl warnings pragma consistently
We've had a mixture of the warnings pragma, the -w switch on the shebang line, and no warnings at all. This patch removes the -w swicth and add the warnings pragma to all perl sources missing it. It raises the severity of the TestingAndDebugging::RequireUseWarnings perlcritic policy to level 5, so that we catch any future violations. Discussion: https://postgr.es/m/20200412074245.GB623763@rfd.leadboat.com
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/perl -w
|
||||
#!/usr/bin/perl
|
||||
#----------------------------------------------------------------------
|
||||
#
|
||||
# fix-old-flex-code.pl
|
||||
|
@@ -3,6 +3,7 @@
|
||||
# src/tools/msvc/build.pl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use File::Basename;
|
||||
use File::Spec;
|
||||
|
@@ -3,6 +3,8 @@
|
||||
# src/tools/msvc/pgbison.pl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use File::Basename;
|
||||
|
||||
# assume we are in the postgres source root
|
||||
|
@@ -3,6 +3,8 @@
|
||||
# src/tools/msvc/pgflex.pl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use File::Basename;
|
||||
|
||||
# silence flex bleatings about file path style
|
||||
|
@@ -3,6 +3,7 @@
|
||||
# src/tools/msvc/vcregress.pl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
our $config;
|
||||
|
||||
|
@@ -19,6 +19,10 @@ verbose = %f: %m at line %l, column %c. %e. ([%p] Severity: %s)\n
|
||||
# allow octal constants with leading zeros
|
||||
[-ValuesAndExpressions::ProhibitLeadingZeros]
|
||||
|
||||
# insist on use of the warnings pragma
|
||||
[TestingAndDebugging::RequireUseWarnings]
|
||||
severity = 5
|
||||
|
||||
# for now raise severity of this to level 5
|
||||
[Subroutines::RequireFinalReturn]
|
||||
severity = 5
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/perl -w
|
||||
#! /usr/bin/perl
|
||||
|
||||
#
|
||||
# This script looks for symbols that are referenced in #ifdef or defined()
|
||||
@@ -21,6 +21,7 @@
|
||||
#
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Cwd;
|
||||
use File::Basename;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/perl -w
|
||||
#! /usr/bin/perl
|
||||
|
||||
#################################################################
|
||||
# version_stamp.pl -- update version stamps throughout the source tree
|
||||
@@ -21,6 +21,7 @@
|
||||
#
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
# Major version is hard-wired into the script. We update it when we branch
|
||||
# a new development version.
|
||||
|
Reference in New Issue
Block a user