Skip to content

Commit 60fe7b4

Browse files
Add code-spell spelling checks to CI (#8067)
Help find and fix silly spelling errors as they are added to the repo.
1 parent 78a2ed6 commit 60fe7b4

File tree

133 files changed

+273
-260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+273
-260
lines changed

.github/workflows/pull-request.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,18 @@ jobs:
269269
bash ./tests/ci/build_boards.sh
270270
bash ./tests/ci/eboot_test.sh
271271
bash ./tests/ci/pkgrefs_test.sh
272+
273+
274+
# Validate orthography
275+
code-spell:
276+
name: Check spelling
277+
runs-on: ubuntu-latest
278+
steps:
279+
- uses: actions/checkout@v2
280+
with:
281+
submodules: true
282+
- name: Run codespell
283+
uses: codespell-project/actions-codespell@master
284+
with:
285+
skip: ./libraries/ESP8266SdFat,./libraries/LittleFS/lib,./tools/pyserial,./tools/sdk,./tools/esptool,./libraries/SoftwareSerial,./libraries/Ethernet,./github/workflows,./libraries/ESP8266HTTPUpdateServer/examples/SecureBearSSLUpdater/SecureBearSSLUpdater.ino,./libraries/esp8266/examples/RTCUserMemory/RTCUserMemory.ino,./libraries/esp8266/examples/StreamString/StreamString.ino,./libraries/ESP8266WiFi/examples/BearSSL_Validation/BearSSL_Validation.ino,./libraries/ESP8266WiFi/examples/BearSSL_Sessions/BearSSL_Sessions.ino,./libraries/ESP8266WebServer/examples/HelloServerBearSSL/HelloServerBearSSL.ino,./libraries/ESP8266WebServer/examples/HttpHashCredAuth/HttpHashCredAuth.ino,./cores/esp8266/spiffs,./tests/device/test_libc/libm_string.c, ./libraries/Netdump/examples/Netdump/Netdump.ino,./libraries/ESP8266WiFi/examples/BearSSL_Server,./cores/esp8266/LwipIntfDev.h
286+
ignore_words_list: ESP8266,esp8266,esp,dout,DOUT,ser,ans

cores/esp8266/CallBackList.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#ifndef __CALLBACKLIST_H__
22
#define __CALLBACKLIST_H__
33

4-
54
/*
6-
CallBackList, An implemention for handling callback execution
5+
CallBackList, An implementation for handling callback execution
76

87
Copyright (c) 2019 Herman Reintke. All rights reserved.
98
This file is part of the esp8266 core for Arduino environment.

cores/esp8266/Esp-frag.cpp

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

2626
void EspClass::getHeapStats(uint32_t* hfree, uint16_t* hmax, uint8_t* hfrag)
2727
{
28-
// L2 / Euclidian norm of free block sizes.
28+
// L2 / Euclidean norm of free block sizes.
2929
// Having getFreeHeap()=sum(hole-size), fragmentation is given by
3030
// 100 * (1 - sqrt(sum(hole-size²)) / sum(hole-size))
3131

cores/esp8266/Esp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "spi_vendors.h"
2727

2828
/**
29-
* AVR macros for WDT managment
29+
* AVR macros for WDT management
3030
*/
3131
typedef enum {
3232
WDTO_0MS = 0, //!< WDTO_0MS
@@ -264,7 +264,7 @@ class EspClass {
264264
static bool flashReplaceBlock(uint32_t address, const uint8_t *value, uint32_t byteCount);
265265
/**
266266
* @brief Write up to @a size bytes from @a data to flash at @a address
267-
* This function takes case of unaligned memory acces by copying @a data to a temporary buffer,
267+
* This function takes case of unaligned memory access by copying @a data to a temporary buffer,
268268
* it also takes care of page boundary crossing see @a flashWritePageBreak as to why it's done.
269269
* Less than @a size bytes may be written, due to 4 byte alignment requirement of spi_flash_write
270270
* @param address address on flash where write should start

cores/esp8266/FSnoop.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void close_all_fs(void)
1515
}
1616

1717
// default weak definitions
18-
// they are overriden in their respective real implementation
18+
// they are overridden in their respective real implementation
1919
// hint: https://github.com/esp8266/Arduino/pull/6699#issuecomment-549085382
2020

2121
void littlefs_request_end(void) __attribute__((weak));

cores/esp8266/HardwareSerial.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class HardwareSerial: public Stream
132132

133133
int peek(void) override
134134
{
135-
// return -1 when data is unvailable (arduino api)
135+
// return -1 when data is unavailable (arduino api)
136136
return uart_peek_char(_uart);
137137
}
138138

@@ -162,7 +162,7 @@ class HardwareSerial: public Stream
162162

163163
int read(void) override
164164
{
165-
// return -1 when data is unvailable (arduino api)
165+
// return -1 when data is unavailable (arduino api)
166166
return uart_read_char(_uart);
167167
}
168168
// ::read(buffer, size): same as readBytes without timeout

cores/esp8266/LwipDhcpServer-NonOS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extern "C"
5151
// trying to change legacy behavor
5252
// `fw_has_started_softap_dhcps` will be read in DhcpServer::DhcpServer
5353
// which is called when c++ ctors are initialized, specifically
54-
// dhcpSoftAP intialized with AP interface number above.
54+
// dhcpSoftAP initialized with AP interface number above.
5555
fw_has_started_softap_dhcps = 1;
5656
#endif
5757
}

cores/esp8266/LwipDhcpServer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ DhcpServer::DhcpServer(netif* netif): _netif(netif)
195195
{ 0 } // gateway 0.0.0.0
196196
};
197197
begin(&ip);
198-
fw_has_started_softap_dhcps = 2; // not 1, ending intial boot sequence
198+
fw_has_started_softap_dhcps = 2; // not 1, ending initial boot sequence
199199
}
200200
};
201201

@@ -454,10 +454,10 @@ uint8_t* DhcpServer::add_offer_options(uint8_t *optptr)
454454
*optptr++ = 1;
455455
*optptr++ = 0x00;
456456

457-
#if 0 // vendor specific unititialized (??)
457+
#if 0 // vendor specific uninitialized (??)
458458
*optptr++ = 43; // vendor specific
459459
*optptr++ = 6;
460-
// unitialized ?
460+
// uninitialized ?
461461
#endif
462462

463463
#if 0 // already set (DHCP_OPTION_SUBNET_MASK==1) (??)

cores/esp8266/Print.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Print {
7676
inline size_t write(int8_t c) { return write((uint8_t) c); }
7777

7878
// default to zero, meaning "a single write may block"
79-
// should be overriden by subclasses with buffering
79+
// should be overridden by subclasses with buffering
8080
virtual int availableForWrite() { return 0; }
8181

8282
size_t printf(const char * format, ...) __attribute__ ((format (printf, 2, 3)));

cores/esp8266/Stream.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ long Stream::parseInt(char skipChar) {
148148

149149
do {
150150
if(c == skipChar)
151-
; // ignore this charactor
151+
; // ignore this character
152152
else if(c == '-')
153153
isNegative = true;
154154
else if(c >= '0' && c <= '9') // is c a digit?

0 commit comments

Comments
 (0)