Skip to content

Commit 19f63c2

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
1 parent 34f35cf commit 19f63c2

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ matrix:
2929
script:
3030
# check code formatting
3131
- 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'
32+
- env:
33+
- NAME=Spell Check
34+
language: python
35+
python: 3.6
36+
# must define an empty before_install phase, otherwise the default one is used
37+
before_install: true
38+
install:
39+
# https://github.com/codespell-project/codespell
40+
- pip install codespell
41+
script:
42+
- codespell --skip="${TRAVIS_BUILD_DIR}/.git" --ignore-words="${TRAVIS_BUILD_DIR}/extras/codespell-ignore-words-list.txt" "${TRAVIS_BUILD_DIR}"
3243
# default phases
3344
before_install:
3445
- wget http://downloads.arduino.cc/arduino-$IDE_VERSION-linux64.tar.xz

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ This library has multiple `begin(...)` methods allowing you to take more control
6868

6969
- `disconnect()` closes the connection to the MQTT Client.
7070

71-
- The `update()` method can be called periodically in the loop of the `.ino` file. If a `ConnectionManager` is implemented it checks network connnections. It also makes sure that a connection with the MQTT broker is active and tries to reconnect otherwise. During `update()` data from the Cloud is retrieved and changed values are posted to the proper MQTT topic.
71+
- The `update()` method can be called periodically in the loop of the `.ino` file. If a `ConnectionManager` is implemented it checks network connections. It also makes sure that a connection with the MQTT broker is active and tries to reconnect otherwise. During `update()` data from the Cloud is retrieved and changed values are posted to the proper MQTT topic.
7272

7373
- `connected()` simply returns the current status of the MQTT connection.
7474

extras/codespell-ignore-words-list.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)