Skip to content

Commit

Permalink
add codespell ignore words file
Browse files Browse the repository at this point in the history
  • Loading branch information
brucelowekamp committed Dec 16, 2019
1 parent ce2858b commit 29e3880
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
File renamed without changes.
3 changes: 3 additions & 0 deletions .codespellignorewords
@@ -0,0 +1,3 @@
thead
acn
ACN
7 changes: 4 additions & 3 deletions .travis-ci.sh
Expand Up @@ -10,7 +10,8 @@ CPP_LINT_URL="https://raw.githubusercontent.com/google/styleguide/gh-pages/cppli
COVERITY_SCAN_BUILD_URL="https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh"

SPELLINGBLACKLIST=$(cat <<-BLACKLIST
-wholename "./.codespellignore" -or \
-wholename "./.codespellignorewords" -or \
-wholename "./.codespellignorelines" -or \
-wholename "./.git/*" -or \
-wholename "./aclocal.m4" -or \
-wholename "./config/config.guess" -or \
Expand Down Expand Up @@ -168,10 +169,10 @@ elif [[ $TASK = 'codespell' ]]; then
$SPELLINGBLACKLIST \
\) | xargs")
# count the number of codespell errors
spellingerrors=$(zrun codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" --exclude-file .codespellignore -L thead $spellingfiles 2>&1 | wc -l)
spellingerrors=$(zrun codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" --exclude-file .codespellignorelines --ignore-words .codespellignorewords $spellingfiles 2>&1 | wc -l)
if [[ $spellingerrors -ne 0 ]]; then
# print the output for info
zrun codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" --exclude-file .codespellignore -L thead $spellingfiles
zrun codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" --exclude-file .codespellignorelines --ignore-words .codespellignorewords $spellingfiles
echo "Found $spellingerrors spelling errors via codespell"
exit 1;
else
Expand Down

0 comments on commit 29e3880

Please sign in to comment.