mirror of
https://github.com/bitcoin/bips.git
synced 2025-10-20 14:07:26 +00:00
CI: improve date validation regex in buildtable.pl
and quote filename variable in link format checker script Co-authored-by: bigbear <155267841+aso20455@users.noreply.github.com> Co-authored-by: Jon Atack <jon@atack.com>
This commit is contained in:
parent
6340cecfbc
commit
664d376c8a
@ -199,7 +199,8 @@ while (++$bipnum <= $topbip) {
|
||||
die "First Comments-URI must be exactly \"$first_comments_uri\" in $fn" unless $val eq $first_comments_uri;
|
||||
}
|
||||
} elsif (exists $DateField{$field}) {
|
||||
die "Invalid date format in $fn" unless $val =~ /^20\d{2}\-(?:0\d|1[012])\-(?:[012]\d|30|31)$/;
|
||||
# Enforce date format 20XX-MM-DD, where XX is 00-99, MM is 01-12 and DD is 01-31
|
||||
die "Invalid date format in $fn" unless $val =~ /^20\d{2}\-(?:0[1-9]|1[0-2])\-(?:0[1-9]|[12]\d|30|31)$/;
|
||||
} elsif (exists $EmailField{$field}) {
|
||||
$val =~ m/^(\S[^<@>]*\S) \<[^@>]*\@[\w.]+\.\w+\>$/ or die "Malformed $field line in $fn";
|
||||
} elsif (not exists $MiscField{$field}) {
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
ECODE=0
|
||||
for fname in *.mediawiki; do
|
||||
GRES=$(grep -n '](http' $fname)
|
||||
GRES=$(grep -n '](http' "$fname")
|
||||
if [ "$GRES" != "" ]; then
|
||||
if [ $ECODE -eq 0 ]; then
|
||||
>&2 echo "Github Mediawiki format writes link as [URL text], not as [text](url):"
|
||||
|
Loading…
x
Reference in New Issue
Block a user