summaryrefslogtreecommitdiff
path: root/contrib/spellcheck
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/spellcheck')
-rwxr-xr-xcontrib/spellcheck22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/spellcheck b/contrib/spellcheck
new file mode 100755
index 000000000..4aa210a50
--- /dev/null
+++ b/contrib/spellcheck
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+dir="$(dirname "$0")"
+
+find src \( -name '*.cpp' -o -name '*.h' \) \! -path 'src/prop/minisat/*' \! -path 'src/prop/bvminisat/*' \! -path 'src/prop/cryptominisat/*' \! -path 'src/parser/*/generated/*' |
+ while read f; do
+ misspelled_words=`
+ $dir/extract-strings-and-comments $f |
+ ispell -a -W 3 2>/dev/null |
+ tail -n +2 |
+ while read s; do
+ case "$s" in
+ \**|\+*|-*) ;;
+ \&*|\#*|\?*) echo "$s" | awk '{print$2}';;
+# *) test -n "$s" && echo "UNKNOWN : $s";;
+ esac
+ done | sort -fu | sed 's,^, ,'`
+ if [ -n "$misspelled_words" ]; then
+ echo "$f"
+ echo "$misspelled_words"
+ fi
+ done
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback