Skip to content

Commit 1413c35

Browse files
committed
tools: make spellcheck script eliminate malformed/mixed-case bolt11 strings.
Signed-off-by: Rusty Russell <[email protected]>
1 parent 50143e3 commit 1413c35

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/spellcheck.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,17 @@ do
6060
# Short hex strings, eg '0x2bb038521914 12'
6161
# long hex strings
6262
# long base58 strings
63-
WORDS=$(sed -e 's/\]([-#a-zA-Z0-9_.]*)//g' \
63+
WORDS=$(sed -e 's/ [lL][nN]\([bB][cC]\|[tT][bB]\)[0-9munpxMUNP]*1[qpzry9x8gf2tvdw0s3jn54khce6mua7lQPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]\+//g' \
64+
-e 's/\]([-#a-zA-Z0-9_.]*)//g' \
6465
-e '/^```/,/^```/d' \
6566
-e 's/`[a-zA-Z0-9_]*`//g' \
6667
-e 's/\* \[`[_a-z0-9*]\+`://g' \
6768
-e 's/0x[a-fA-F0-9 ]\+//g' \
6869
-e 's/[a-fA-F0-9]\{20,\}//g' \
6970
-e 's/^ .*_htlcs//g' \
70-
-e 's/ ln\(bc\|tb\)[0-9munp]*1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]\+//g' \
7171
-e 's/ \(bc\|tb\)1[qpzry9x8gf2tvdw0s3jn54khce6mua7l]\+//g' \
72-
-e 's/[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]\{20,\}//g' < $f | aspell -l en_US --home-dir ${homedir} list)
72+
-e 's/pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdpquwpc4curk03c9wlrswe78q4eyqc7d8d0xqzpuyk0sg5g70me25alkluzd2x62aysf2pyy8edtjeevuv4p2d5p76r4zkmneet7uvyakky2zr4cusd45tftc9c5fh0nnqpnl2jfll544esqchsrny//' \
73+
-e 's/[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]\{20,\}//g' < $f | tee /tmp/`basename $f`.aspell | aspell -l en_US --home-dir ${homedir} list)
7374
if [ -n "$WORDS" ]; then
7475
echo Misspelled words in $f: $WORDS >&2
7576
exit 1

0 commit comments

Comments
 (0)