2023-06-30 23:41:20 +00:00
|
|
|
#!/bin/bash -u
|
|
|
|
|
|
|
|
## Main discouraged words
|
|
|
|
for f in $( git ls-files | grep -v "$0" ) ; do
|
|
|
|
# 1. Find discouraged words
|
|
|
|
# 2. Ignore things that look like json or code (Bitcoin Core RPCs use many discouraged words)
|
|
|
|
egrep -if <( sed "1,/[S]TART DISCOURAGED WORDS/d" "$0" ) "$f" \
|
|
|
|
| grep -v "[\"'][a-zA-Z]\+[\"']" \
|
|
|
|
| if grep . ; then
|
|
|
|
echo "DISCOURAGED WORDS FOUND IN $f"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
## Discouraged words that require special greps
|
|
|
|
for f in $( git ls-files | grep -v "$0" ) ; do
|
|
|
|
{
|
|
|
|
echo -n
|
|
|
|
} | if grep . ; then echo "DISCOURAGED WORDS FOUND IN $f" ; exit 1 ; fi
|
|
|
|
done
|
|
|
|
|
|
|
|
exit
|
|
|
|
## START DISCOURAGED WORDS
|
|
|
|
BIP-[1-9]
|
|
|
|
BIP0
|
|
|
|
BIP [0-9]
|
|
|
|
\<nversion\>
|
|
|
|
\<nsequence\>
|
|
|
|
\<nlocktime\>
|
|
|
|
\<locktime\>
|
|
|
|
\<vin\>
|
|
|
|
\<vout\>
|
|
|
|
\<scriptSig\>
|
|
|
|
\<scriptPubKey\>
|
|
|
|
\<redeemScript\>
|
|
|
|
\<nAmount\>
|
|
|
|
\<nValue\>
|
|
|
|
witness field
|
|
|
|
witness element
|
2023-07-07 17:43:03 +00:00
|
|
|
feerate
|