diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/buildtable.pl | 7 | ||||
-rwxr-xr-x | scripts/link-format-chk.sh | 23 |
2 files changed, 28 insertions, 2 deletions
diff --git a/scripts/buildtable.pl b/scripts/buildtable.pl index 36701a5..1edd8c0 100755 --- a/scripts/buildtable.pl +++ b/scripts/buildtable.pl @@ -19,6 +19,7 @@ my %MayHaveMulti = ( Author => undef, 'Comments-URI' => undef, License => undef, + 'License-Code' => undef, 'Post-History' => undef, ); my %DateField = ( @@ -33,6 +34,7 @@ my %MiscField = ( 'Discussions-To' => undef, 'Post-History' => undef, 'Replaces' => undef, + 'Requires' => undef, 'Superseded-By' => undef, ); @@ -52,6 +54,7 @@ my %ValidStatus = ( Final => "background-color: #cfffcf", Active => "background-color: #cfffcf", Replaced => "background-color: #ffcfcf", + Obsolete => "background-color: #ffcfcf", ); my %ValidType = ( 'Standards Track' => 'Standard', @@ -149,9 +152,9 @@ while (++$bipnum <= $topbip) { } elsif ($field eq 'Layer') { # BIP 123 die "Invalid layer $val in $fn" unless exists $ValidLayer{$val}; $layer = $val; - } elsif ($field eq 'License') { + } elsif ($field =~ /^License(?:\-Code)?$/) { die "Undefined license $val in $fn" unless exists $DefinedLicenses{$val}; - if (not $found{License}) { + if (not $found{$field}) { die "Unacceptable license $val in $fn" unless exists $AcceptableLicenses{$val} or ($val eq 'PD' and exists $GrandfatheredPD{$bipnum}); } } elsif ($field eq 'Comments-URI') { diff --git a/scripts/link-format-chk.sh b/scripts/link-format-chk.sh new file mode 100755 index 0000000..e3f0f6d --- /dev/null +++ b/scripts/link-format-chk.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2019 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. +# +# Check wrong mediawiki link format + +ECODE=0 +FILES="" +for fname in $(git diff --name-only HEAD $(git merge-base HEAD master)); do + if [[ $fname == *.mediawiki ]]; then + 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):" + fi + ECODE=1 + echo "- $fname:$GRES" + fi + fi +done +exit $ECODE |