1
0
mirror of https://github.com/bitcoin/bips.git synced 2024-11-19 01:40:05 +01:00

ci: Run link format check on all mediawiki documents

This commit is contained in:
Ava Chow 2024-05-01 18:00:54 -04:00
parent 3bd457c595
commit 3a2031380d

View File

@ -8,16 +8,14 @@
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"
for fname in *.mediawiki; do
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
done
exit $ECODE