Do not spell check Makefiles and JSON files

Spell check does not handle JSON files very well. It finds misspelled
words in hexadecimal hashes (like misspelled "dead" in "123daed456").

Ignore Makefiles too - there is not so much free text to spell check
and the spell check complains about words it was told by Makefile to
ignore.
This commit is contained in:
Krzesimir Nowak
2016-08-04 11:44:21 +02:00
parent dcaa7503b8
commit 97eb8d033d

View File

@@ -40,11 +40,11 @@ function spell_check {
filename="$1"
local lint_result=0
# we don't want to spell check tar balls or binaries
# we don't want to spell check tar balls, binaries, Makefile and json files
if file "$filename" | grep executable >/dev/null 2>&1; then
return $lint_result
fi
if [[ $filename == *".tar" || $filename == *".gz" ]]; then
if [[ $filename == *".tar" || $filename == *".gz" || $filename == *".json" || $(basename "$filename") == "Makefile" ]]; then
return $lint_result
fi