diff --git a/check-spelling.sh b/check-spelling.sh new file mode 100755 index 0000000..558c67a --- /dev/null +++ b/check-spelling.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +errors=0 +path="tests/spelling/" +mkdir -p $path +misspelled="$path"misspelled-words.txt +if [ -f $misspelled ] ; then + rm $misspelled +fi +for file in $(find . -name "*.md"); +do + echo "$file" >> "$path"misspelled-words-temp.txt + aspell list --lang=en --encoding=utf-8 --personal=./.aspell.en.pws < "$file" | sort -u >> "$path"misspelled-words-temp.txt + if [ "$(wc -l <"$path"misspelled-words-temp.txt)" -ge 2 ] + then + echo >> "$path"misspelled-words-temp.txt + cat "$path"misspelled-words-temp.txt + cat "$path"misspelled-words-temp.txt >> "$path"misspelled-words.txt + errors=1 + fi + :> "$path"misspelled-words-temp.txt +done +if [ -f "$path"misspelled-words-temp.txt ] ; then + rm "$path"misspelled-words-temp.txt +fi +if [ "$errors" -ge 1 ] +then + exit 1 +else + exit 0 +fi diff --git a/tests/spelling/misspelled-words.txt b/tests/spelling/misspelled-words.txt new file mode 100644 index 0000000..5eb243e --- /dev/null +++ b/tests/spelling/misspelled-words.txt @@ -0,0 +1,71 @@ +./docs/reseller-hosting/dns.md +DNS + +./docs/networking/win10v6.md +ICMPv +IPv +ProtoTypeICMPv +cirru +img +msc +png +wf + +./docs/contact.md +ISP's +NOC + +./docs/index.md +DNS +OPcache +cPanel +cpanel +opcache +php + +./docs/cpanel-hosting/hosts-file.md +AAAA +DNS +IPv +Notepa +RunAsAdmin +StartMenu +cirru +cmd +exe +hostsfile +img +png +sys + +./docs/cpanel-hosting/php-opcache.md +AppDynamics +OPcache +PHPs +Uncheck +bytecode +cPanel +cirru +htaccess +opcache +php +precompiled +runtime +zend + +./docs/cpanel-hosting/index.md +cPanel + +./docs/cpanel-hosting/email-settings.md +IMAP +SMTP +SettingsMenu +accountMenu +accountPOP +cPanel +cirru +hl +img +png +startmenu +