mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
config
contrib
adminpack
amcheck
auth_delay
auto_explain
bloom
bool_plperl
btree_gin
btree_gist
citext
cube
dblink
dict_int
dict_xsyn
earthdistance
file_fdw
fuzzystrmatch
hstore
hstore_plperl
hstore_plpython
intagg
intarray
isn
jsonb_plperl
jsonb_plpython
lo
ltree
ltree_plpython
oid2name
pageinspect
passwordcheck
pg_buffercache
pg_freespacemap
pg_prewarm
pg_standby
pg_stat_statements
pg_trgm
pg_visibility
pgcrypto
pgrowlocks
pgstattuple
postgres_fdw
seg
data
expected
sql
.gitignore
Makefile
seg--1.0--1.1.sql
seg--1.1--1.2.sql
seg--1.1.sql
seg--1.2--1.3.sql
seg-validate.pl
seg.c
seg.control
segdata.h
segparse.y
segscan.l
sort-segments.pl
sepgsql
spi
sslinfo
start-scripts
tablefunc
tcn
test_decoding
tsm_system_rows
tsm_system_time
unaccent
uuid-ossp
vacuumlo
xml2
Makefile
README
contrib-global.mk
doc
src
.dir-locals.el
.editorconfig
.gitattributes
.gitignore
COPYRIGHT
GNUmakefile.in
HISTORY
Makefile
README
README.git
aclocal.m4
configure
configure.in
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
55 lines
782 B
Perl
Executable File
55 lines
782 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
my $integer = '[+-]?[0-9]+';
|
|
my $real = '[+-]?[0-9]+\.[0-9]+';
|
|
|
|
my $RANGE = '(\.\.)(\.)?';
|
|
my $PLUMIN = q(\'\+\-\');
|
|
my $FLOAT = "(($integer)|($real))([eE]($integer))?";
|
|
my $EXTENSION = '<|>|~';
|
|
|
|
my $boundary = "($EXTENSION)?$FLOAT";
|
|
my $deviation = $FLOAT;
|
|
|
|
my $rule_1 = $boundary . $PLUMIN . $deviation;
|
|
my $rule_2 = $boundary . $RANGE . $boundary;
|
|
my $rule_3 = $boundary . $RANGE;
|
|
my $rule_4 = $RANGE . $boundary;
|
|
my $rule_5 = $boundary;
|
|
|
|
|
|
print "$rule_5\n";
|
|
while (<>)
|
|
{
|
|
|
|
# s/ +//g;
|
|
if (/^($rule_1)$/)
|
|
{
|
|
print;
|
|
}
|
|
elsif (/^($rule_2)$/)
|
|
{
|
|
print;
|
|
}
|
|
elsif (/^($rule_3)$/)
|
|
{
|
|
print;
|
|
}
|
|
elsif (/^($rule_4)$/)
|
|
{
|
|
print;
|
|
}
|
|
elsif (/^($rule_5)$/)
|
|
{
|
|
print;
|
|
}
|
|
else
|
|
{
|
|
print STDERR "error in $_\n";
|
|
}
|
|
|
|
}
|