Add script to sanitise spellings list

This commit is contained in:
Ben Edgington
2022-08-19 12:53:32 +01:00
parent aa27679bde
commit f71741f220
2 changed files with 30 additions and 4 deletions

View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Sanitise the spellings list by finding any unused entries
check=$(dirname "$0")/../build/spellcheck.sh
source=../../src/book.md
words=../../src/spellings.txt
# Pre-requisite is to pass a normal spell check (no words missing)
output=$($check $source $words)
if [[ "$output" != "" ]]
then
echo "Existing spelling errors need to be fixed:"
echo $output
exit 1
fi
# Now spell check against an empty list and save the output
tmpin=$(mktemp)
tmpout=$(mktemp)
$check $source $tmpin | awk '{print $3}' | sort -u >> $tmpout
diff $tmpout $words
rm -f $tmpin $tmpout

View File

@@ -58,6 +58,7 @@ ETC's
ETH
ETHconomics
Elowsson
Elowsson's
Endianness
Eth
EthStaker
@@ -89,11 +90,13 @@ JSON
Jacek's
Joachim
Keccak
Kyne
Kyne's
LMD
Lamport
Lamport's
Lifecycle
Liskov
Liskov's
Liveness
Lookahead
MEV
@@ -157,7 +160,6 @@ Serialization
Serialize
Shacham
Shapovalov
Sharding
Shostak
Signedness
Slashings
@@ -274,7 +276,6 @@ misbehaviours
misconfiguration
modularity
monocultures
num
parallelise
parallelising
parameterises
@@ -329,7 +330,6 @@ uptime
validator
validator's
validators
vals
verifiability
verifiably
verifier