Skip to content

Commit 2a23e6e

Browse files
committed
Finalizing spell checker
1 parent 9a2bcbc commit 2a23e6e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

cicd/spelling.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,19 @@
88
# -a: Morphological analysis
99
# -l: List only misspelled words
1010
# -d dict/words: Adds custom dictionary located in dict/words
11-
hunspellOutput="$(find . -type f -name '*.tex' | xargs hunspell -d en_GB -t -a -l -p dict/words)"
11+
hunspellOutput="$(find . -type f -name '*.tex' | xargs hunspell -d en_GB -t -a -l -p dict/words)"
12+
if [ "${hunspellOutput}" != "" ]; then
13+
# Spelling errors
14+
echo ""
15+
echo "======================================="
16+
echo "There are spelling errors listed below."
17+
echo "Either fix, or add to \"dict/words\""
18+
echo "======================================="
19+
echo ""
20+
hunspell -d en_GB -t -a -l -p dict/words *tex
21+
exit 1
22+
23+
else
24+
echo "Spelling looks good to me..."
25+
26+
fi

0 commit comments

Comments
 (0)