Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 1e7b72c

Browse files
per1234aentinger
authored andcommitted
Check for commonly misspelled words during the CI build
codespell is a blacklist-based spell checker. This approach is more appropriate for a CI build because it results in far less false positives than would traditional whitelist-based spell checking, with the disadvantage of having more false negatives. So it won't catch all the typos, but it also won't be spuriously breaking every other build. When false positives do occur, they can be resolved by adding the problematic word to extras/codespell-ignore-words-list.txt I configured codespell to ignore the contents of src/lib and test/external because these appear to contain external projects and spell checking of those files would be better done in their own repositories.
1 parent 21d267e commit 1e7b72c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.travis.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ matrix:
4646
# check code formatting
4747
- find . -regextype posix-extended -path './.git' -prune -or -path './src/lib' -prune -or -path './test/external' -prune -or \( -iregex '.*\.((ino)|(h)|(hpp)|(hh)|(hxx)|(h\+\+)|(cpp)|(cc)|(cxx)|(c\+\+)|(cp)|(c)|(ipp)|(ii)|(ixx)|(inl)|(tpp)|(txx)|(tpl))$' -and -type f \) -print0 | xargs -0 -L1 bash -c 'if ! diff $0 <(astyle --options=${HOME}/astyle/examples_formatter.conf --dry-run < $0); then echo "Non-compliant code formatting in $0"; false; fi'
4848

49+
- env:
50+
- NAME=Spell Check
51+
52+
language: python
53+
python: 3.6
54+
55+
install:
56+
# https://github.com/codespell-project/codespell
57+
- pip install codespell
58+
script:
59+
- codespell --skip="${TRAVIS_BUILD_DIR}/.git","${TRAVIS_BUILD_DIR}/src/lib","${TRAVIS_BUILD_DIR}/test/external" --ignore-words="${TRAVIS_BUILD_DIR}/extras/codespell-ignore-words-list.txt" "${TRAVIS_BUILD_DIR}"
60+
4961
notifications:
5062
webhooks:
5163
urls:

extras/codespell-ignore-words-list.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)