Skip to content

Commit 76a36dd

Browse files
committed
Check for commonly misspelled words during the CI build
Use codespell to check for commonly misspelled words during the Travis CI build. In the event of false positives, the words can be added to extras/codespell-ignore-words-list.txt, after which codespell will ignore those words.
1 parent 3a8cb6d commit 76a36dd

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
@@ -48,6 +48,18 @@ matrix:
4848
# check code formatting
4949
- find . -regextype posix-extended -path './.git' -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'
5050

51+
# check all files for commonly misspelled words
52+
- env:
53+
- NAME='Spell Check'
54+
language: python
55+
python: 3.6
56+
before_install:
57+
# https://github.com/codespell-project/codespell
58+
- pip install codespell
59+
script:
60+
# codespell will ignore any words in extras/codespell-ignore-words-list.txt, which may be used to fix false positives
61+
- codespell --skip="${TRAVIS_BUILD_DIR}/.git" --ignore-words="${TRAVIS_BUILD_DIR}/extras/codespell-ignore-words-list.txt" "${TRAVIS_BUILD_DIR}"
62+
5163
# default phases shared by the compilation tests
5264
before_install:
5365
- wget http://downloads.arduino.cc/arduino-cli/arduino-cli-$CLI_VERSION-linux64.tar.bz2

extras/codespell-ignore-words-list.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)