Skip to content

Commit cef0f02

Browse files
Added spelling CI (#316)
* Updating comments and documents * Function rename for spelling fix * Updating the CI config * Updated changelog * Revert copied arduino files * Moving all setting to codespell config * Move setting from CI to config for codespell
1 parent d72c378 commit cef0f02

25 files changed

+81
-48
lines changed

.codespellignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
aci
2+
ba
3+
flem

.codespellrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[codespell]
2+
skip = ./cpp/arduino/avr/*
3+
ignore-words=.codespellignore

.github/workflows/spelling.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This is the name of the workflow, visible on GitHub UI
2+
name: Check Spelling
3+
4+
on:
5+
push:
6+
branches-ignore: [master, main]
7+
# Remove the line above to run when pushing to master
8+
pull_request:
9+
branches: [master, main]
10+
11+
jobs:
12+
build:
13+
name: Check Spelling
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout Code
18+
uses: actions/checkout@v2
19+
with:
20+
# Full git history is needed to get a proper list of changed files within `super-linter`
21+
fetch-depth: 0
22+
23+
- name: Check Spelling
24+
uses: codespell-project/actions-codespell@master
25+
with:
26+
check_filenames: true

CHANGELOG.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99
### Added
1010
- Allow use of watchdog timer in application code (though it doesn't do anything)
1111
- Show output from successful compile
12-
- `--min-free-space=N` command-line argument to fail if free space is below requred value
12+
- `--min-free-space=N` command-line argument to fail if free space is below required value
1313
- Add `_BV()` macro.
1414
- Support for `dtostrf()`
15+
- Added a CI workflow to check for spelling errors
1516

1617
### Changed
1718
- We now compile a shared library to be used for each test.
@@ -39,7 +40,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
3940
- Better indications of which example sketch is being compiled as part of testing
4041

4142
### Changed
42-
- Topmost installtion instructions now suggest `gem install arduino_ci` instead of using a `Gemfile`. Reasons for using a `Gemfile` are listed and discussed separately further down the README.
43+
- Topmost installation instructions now suggest `gem install arduino_ci` instead of using a `Gemfile`. Reasons for using a `Gemfile` are listed and discussed separately further down the README.
4344
- Stream::readStreamUntil() no longer returns delimiter
4445

4546
### Removed
@@ -100,7 +101,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
100101
## [1.0.0] - 2020-11-29
101102
### Added
102103
- Special handling of attempts to run the `arduino_ci.rb` CI script against the ruby library instead of an actual Arduino project
103-
- Explicit checks for attemping to test `arduino_ci` itself as if it were a library, resolving a minor annoyance to this developer.
104+
- Explicit checks for attempting to test `arduino_ci` itself as if it were a library, resolving a minor annoyance to this developer.
104105
- Code coverage tooling
105106
- Explicit check and warning for library directory names that do not match our guess of what the library should/would be called
106107
- Symlink tests for `Host`
@@ -207,7 +208,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
207208
## [0.1.21] - 2019-02-07
208209
### Added
209210
- Proper `ostream operator <<` for `nullptr`
210-
- Proper comparison operations fro `nullptr`
211+
- Proper comparison operations for `nullptr`
211212

212213
### Changed
213214
- `Compare.h` heavily refactored to use a smallish macro
@@ -235,7 +236,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
235236

236237
### Fixed
237238
- Assertions on `nullptr`
238-
- The defintion of `nullptr`
239+
- The definition of `nullptr`
239240

240241

241242
## [0.1.18] - 2019-01-29
@@ -298,7 +299,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
298299
- Checking for (empty) set of platforms to build now precedes the check for examples to build; this avoids assuming that all libraries will have an example and dumping the file set when none are found
299300

300301
### Fixed
301-
- Spaces in the names of project directores no longer cause unit test binaries to fail execution
302+
- Spaces in the names of project directories no longer cause unit test binaries to fail execution
302303
- Configuration file overrides with `nil`s (or empty arrays) now properly override their base configuration
303304

304305

@@ -429,15 +430,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
429430
### Fixed
430431
- Replaced pipes with `Open3.capture3` to avoid deadlocks when commands have too much output
431432
- `ci_config.rb` now returns empty arrays (instead of nil) for undefined config keys
432-
- `pgmspace.h` explictly includes `<string.h>`
433+
- `pgmspace.h` explicitly includes `<string.h>`
433434
- `__FlashStringHelper` should now be properly mocked for compilation
434435
- `WString.h` bool operator now works and is simpler
435436

436437

437438
## [0.1.5] - 2018-03-05
438439
### Added
439440
- Yaml files can have either `.yml` or `.yaml` extensions
440-
- Yaml files support select/reject critera for paths of unit tests for targeted testing
441+
- Yaml files support select/reject criteria for paths of unit tests for targeted testing
441442
- Pins now track history and can report it in Ascii (big- or little-endian) for digital sequences
442443
- Pins now accept an array (or string) of input bits for providing pin values across multiple reads
443444
- FlashStringHelper (and related macros) compilation mocks
@@ -490,7 +491,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
490491
### Fixed
491492
- All test files were reporting "not ok" in TAP output. Now they are OK iff all asserts pass.
492493
- Directories with a C++ extension in their name could cause problems. Now they are ignored.
493-
- `CppLibrary` had trouble with symlinks. It shoudn't anymore.
494+
- `CppLibrary` had trouble with symlinks. It shouldn't anymore.
494495
- `CppLibrary` had trouble with vendor bundles. It might in the future, but I have a better fix ready to go if it's an issue.
495496

496497

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This project has the following dependencies:
3333

3434
* `ruby` 2.5 or higher
3535
* A compiler like `g++` (on OSX, `clang` works; on Cygwin, use the `mingw-gcc-c++` package)
36-
* `python` (if using a board architecutre that requires it, e.g. ESP32, ESP8266; see [this issue](https://github.com/Arduino-CI/arduino_ci/issues/235#issuecomment-739629243)). Consider `pyserial` as well.
36+
* `python` (if using a board architecture that requires it, e.g. ESP32, ESP8266; see [this issue](https://github.com/Arduino-CI/arduino_ci/issues/235#issuecomment-739629243)). Consider `pyserial` as well.
3737

3838
In that environment, you can install by running `gem install arduino_ci`. To update to a latest version, use `gem update arduino_ci`.
3939

@@ -51,7 +51,7 @@ Arduino expects all libraries to be in a specific `Arduino/libraries` directory
5151
5252
### Changes to Your Repository
5353

54-
Unit testing binaries created by `arduino_ci` should not be commited to the codebase. To avoid that, add the following to your `.gitignore`:
54+
Unit testing binaries created by `arduino_ci` should not be committed to the codebase. To avoid that, add the following to your `.gitignore`:
5555

5656
```ignore-list
5757
# arduino_ci unit test binaries and artifacts

REFERENCE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
All tests are run via the same command: `bundle exec arduino_ci.rb`.
44

5-
This script is responsible for detecting and runing all unit tests, on every combination of Arduino platform and C++ compiler. This is followed by attempting to detect and build every example on every "default" Arduino platform.
5+
This script is responsible for detecting and running all unit tests, on every combination of Arduino platform and C++ compiler. This is followed by attempting to detect and build every example on every "default" Arduino platform.
66

77
As a prerequisite, all Arduino "default" platforms are installed if they are not already available.
88

@@ -398,7 +398,7 @@ unittest(pin_read_history)
398398
bool bigEndian = true;
399399
state->digitalPin[1].fromAscii("Yo", bigEndian);
400400
401-
// digitial history as serial data, big-endian
401+
// digital history as serial data, big-endian
402402
bool expectedBits[16] = {
403403
0, 1, 0, 1, 1, 0, 0, 1, // Y
404404
0, 1, 1, 0, 1, 1, 1, 1 // o
@@ -515,7 +515,7 @@ For additional complexity, there are some cases where you want to use a pin as a
515515
```C++
516516
int myPin = 3;
517517
518-
// digitial history as serial data, big-endian
518+
// digital history as serial data, big-endian
519519
bool bigEndian = true;
520520
bool binaryAscii[24] = {
521521
0, 1, 0, 1, 1, 0, 0, 1, // Y

SampleProjects/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Arduino Sample Projects
22
=======================
33

4-
This directory contains projects that are intended solely for testing the various features of this gem -- to test the testing framework itself. The RSpec tests refer specifically to these projects, and as a result _some are explicity designed to fail_.
4+
This directory contains projects that are intended solely for testing the various features of this gem -- to test the testing framework itself. The RSpec tests refer specifically to these projects, and as a result _some are explicitly designed to fail_.
55

66
> **If you are a first-time `arduino_ci` user an are looking for an example to copy from, see [the `Arduino-CI/Blink` repository](https://github.com/Arduino-CI/Blink) instead.**
77
8-
* "TestSomething" contains a minimial library, but tests for all the C++ compilation feature-mocks of arduino_ci.
9-
* "DoSomething" is a simple test of the testing framework (arduino_ci) itself to verfy that passes and failures are properly identified and reported. Because of this, it includes test files that are expected to fail -- they are prefixed with "bad-".
8+
* "TestSomething" contains a minimal library, but tests for all the C++ compilation feature-mocks of arduino_ci.
9+
* "DoSomething" is a simple test of the testing framework (arduino_ci) itself to verify that passes and failures are properly identified and reported. Because of this, it includes test files that are expected to fail -- they are prefixed with "bad-".
1010
* "OnePointOhDummy" is a non-functional library meant to test file inclusion logic on libraries conforming to the "1.0" specification
11-
* "OnePointFiveMalformed" is a non-functional library meant to test file inclusion logic on libraries that attempt to conform to the ["1.5" specfication](https://arduino.github.io/arduino-cli/latest/library-specification/) but fail to include a `src` directory
12-
* "OnePointFiveDummy" is a non-functional library meant to test file inclusion logic on libraries conforming to the ["1.5" specfication](https://arduino.github.io/arduino-cli/latest/library-specification/)
11+
* "OnePointFiveMalformed" is a non-functional library meant to test file inclusion logic on libraries that attempt to conform to the ["1.5" specification](https://arduino.github.io/arduino-cli/latest/library-specification/) but fail to include a `src` directory
12+
* "OnePointFiveDummy" is a non-functional library meant to test file inclusion logic on libraries conforming to the ["1.5" specification](https://arduino.github.io/arduino-cli/latest/library-specification/)
1313
* "DependOnSomething" is a non-functional library meant to test file inclusion logic with dependencies
1414
* "ExcludeSomething" is a non-functional library meant to test directory exclusion logic
1515
* "NetworkLib" tests the Ethernet library

SampleProjects/TestSomething/test/godmode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ unittest(pin_read_history) {
7575
assertEqual(future[5], analogRead(1));
7676

7777
state->digitalPin[1].fromAscii("Yo", true);
78-
// digitial history as serial data, big-endian
78+
// digital history as serial data, big-endian
7979
bool binaryAscii[16] = {
8080
0, 1, 0, 1, 1, 0, 0, 1,
8181
0, 1, 1, 0, 1, 1, 1, 1

SampleProjects/TestSomething/test/pinhistory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ unittest(pin_read_history_bool_to_ascii) {
2222
PinHistory<bool> phb; // pin history bool
2323
phb.fromAscii("Yo", true);
2424

25-
// digitial history as serial data, big-endian
25+
// digital history as serial data, big-endian
2626
bool binaryAscii[16] = {
2727
0, 1, 0, 1, 1, 0, 0, 1,
2828
0, 1, 1, 0, 1, 1, 1, 1};

cpp/arduino/Client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class Client : public Stream {
77
public:
88
Client() {
9-
// The Stream mock defines a String buffer but never puts anyting in it!
9+
// The Stream mock defines a String buffer but never puts anything in it!
1010
if (!mGodmodeDataIn) {
1111
mGodmodeDataIn = new String;
1212
}

0 commit comments

Comments
 (0)