Skip to content

Commit 173e8ea

Browse files
authored
Merge pull request #150 from per1234/spell-check
Add CI workflow to check for commonly misspelled words
2 parents d06d9b2 + 14defce commit 173e8ea

File tree

19 files changed

+51
-21
lines changed

19 files changed

+51
-21
lines changed

.codespellrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See: https://github.com/codespell-project/codespell#using-a-config-file
2+
[codespell]
3+
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
4+
ignore-words-list = hel
5+
check-filenames =
6+
check-hidden =
7+
skip = ./.git,./test/external

.github/workflows/spell-check.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Spell Check
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
# Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates.
9+
- cron: "0 8 * * TUE"
10+
workflow_dispatch:
11+
repository_dispatch:
12+
13+
jobs:
14+
spellcheck:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
21+
- name: Spell check
22+
uses: codespell-project/actions-codespell@master

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Unit Tests
22

33
on:
44
pull_request:
5-
# Only run workflow if a file in these paths are modified
5+
# Only run workflow if a file in these paths is modified
66
paths:
77
- ".github/workflows/unit-tests.yml"
88
- "test/**"

README.md

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

33
[![Unit Tests](https://github.com/arduino/ArduinoCore-API/workflows/Unit%20Tests/badge.svg)](https://github.com/arduino/ArduinoCore-API/actions?workflow=Unit+Tests)
44
[![codecov](https://codecov.io/gh/arduino/ArduinoCore-API/branch/master/graph/badge.svg)](https://codecov.io/gh/arduino/ArduinoCore-API)
5+
[![Spell Check status](https://github.com/arduino/ArduinoCore-API/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino/ArduinoCore-API/actions/workflows/spell-check.yml)
56

67
This repository hosts the hardware independent layer of Arduino core.
78

89
All Arduino official cores are being ported to the new structure so they take advantage of this single repo.
910

1011
Including this repo in your existing Arduino core will allow the language to grow and include new features.
11-
For backwards compatibility, every revision of this repo will increase `ARDUINO_API_VERSION` define.
12+
For backwards compatibility, every revision of this repo will increase the `ARDUINO_API_VERSION` define.
1213

1314
Some cores have been ported to the new structure, for example:
1415
* megaAVR (https://github.com/arduino/ArduinoCore-megaAVR)
@@ -20,7 +21,7 @@ These repositories **don't** contain the needed `api` subfolder; to "complete" t
2021

2122
### Porting tips
2223

23-
In the future, core apis will be updated independently from the core, so all the compatible cores will seamlessly adopt new features.
24+
In the future, core APIs will be updated independently from the core, so all the compatible cores will seamlessly adopt new features.
2425
This requires support from all the IDEs, so in the meantime we suggest to release the core by copying a snapshot of this `api` folder.
2526

2627
The most elegant and effective solution is to develop the core with `api` symlinked and produce the distributable archive by telling `tar` to follow symlinks.

api/IPAddress.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ bool IPAddress::fromString(const char *address)
6666
else if (c == '.')
6767
{
6868
if (dots == 3) {
69-
// Too much dots (there must be 3 dots)
69+
// Too many dots (there must be 3 dots)
7070
return false;
7171
}
7272
if (acc < 0) {

api/Udp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ class UDP : public Stream {
4848

4949
// Sending UDP packets
5050

51-
// Start building up a packet to send to the remote host specific in ip and port
51+
// Start building up a packet to send to the remote host specified in ip and port
5252
// Returns 1 if successful, 0 if there was a problem with the supplied IP address or port
5353
virtual int beginPacket(IPAddress ip, uint16_t port) =0;
54-
// Start building up a packet to send to the remote host specific in host and port
54+
// Start building up a packet to send to the remote host specified in host and port
5555
// Returns 1 if successful, 0 if there was a problem resolving the hostname or port
5656
virtual int beginPacket(const char *host, uint16_t port) =0;
5757
// Finish off this packet and send it

api/deprecated-avr-comp/avr/interrupt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
/*
2020
Empty file.
2121
This file is here to allow compatibility with sketches (made for AVR)
22-
that includes <AVR/interrupt.h>
22+
that include <AVR/interrupt.h>
2323
*/

api/deprecated/Client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
// including Client.h is deprecated, for all future projects use Arduino.h instead
2020

21-
// This include is added for compatibility, it will be remove on the next
21+
// This include is added for compatibility, it will be removed on the next
2222
// major release of the API
2323
#include "../Client.h"
2424

api/deprecated/HardwareSerial.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
// including HardwareSerial.h is deprecated, for all future projects use Arduino.h instead
2020

21-
// This include is added for compatibility, it will be remove on the next
21+
// This include is added for compatibility, it will be removed on the next
2222
// major release of the API
2323
#include "../HardwareSerial.h"
2424

api/deprecated/IPAddress.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
// including IPAddress.h is deprecated, for all future projects use Arduino.h instead
2020

21-
// This include is added for compatibility, it will be remove on the next
21+
// This include is added for compatibility, it will be removed on the next
2222
// major release of the API
2323
#include "../IPAddress.h"
2424

0 commit comments

Comments
 (0)