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

+15
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

+1-2
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

+1-1
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

+2-2
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

+1-1
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

+2-2
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

+1-1
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

+3-3
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

+1-1
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

+1-1
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?

cores/esp8266/Stream.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -162,27 +162,27 @@ class Stream: public Print {
162162
// ::send*() methods:
163163
// - always stop before timeout when "no-more-input-possible-data"
164164
// or "no-more-output-possible-data" condition is met
165-
// - always return number of transfered bytes
165+
// - always return number of transferred bytes
166166
// When result is 0 or less than requested maxLen, Print::getLastSend()
167167
// contains an error reason.
168168

169169
// transfers already buffered / immediately available data (no timeout)
170-
// returns number of transfered bytes
170+
// returns number of transferred bytes
171171
size_t sendAvailable (Print* to) { return sendGeneric(to, -1, -1, oneShotMs::alwaysExpired); }
172172
size_t sendAvailable (Print& to) { return sendAvailable(&to); }
173173

174174
// transfers data until timeout
175-
// returns number of transfered bytes
175+
// returns number of transferred bytes
176176
size_t sendAll (Print* to, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendGeneric(to, -1, -1, timeoutMs); }
177177
size_t sendAll (Print& to, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendAll(&to, timeoutMs); }
178178

179-
// transfers data until a char is encountered (the char is swallowed but not transfered) with timeout
180-
// returns number of transfered bytes
179+
// transfers data until a char is encountered (the char is swallowed but not transferred) with timeout
180+
// returns number of transferred bytes
181181
size_t sendUntil (Print* to, const int readUntilChar, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendGeneric(to, -1, readUntilChar, timeoutMs); }
182182
size_t sendUntil (Print& to, const int readUntilChar, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendUntil(&to, readUntilChar, timeoutMs); }
183183

184184
// transfers data until requested size or timeout
185-
// returns number of transfered bytes
185+
// returns number of transferred bytes
186186
size_t sendSize (Print* to, const ssize_t maxLen, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendGeneric(to, maxLen, -1, timeoutMs); }
187187
size_t sendSize (Print& to, const ssize_t maxLen, const oneShotMs::timeType timeoutMs = oneShotMs::neverExpires) { return sendSize(&to, maxLen, timeoutMs); }
188188

cores/esp8266/StreamString.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class StreamString: public String, public S2Stream
230230
StreamString(StreamString&& bro): String(bro), S2Stream(this) { }
231231
StreamString(const StreamString& bro): String(bro), S2Stream(this) { }
232232

233-
// duplicate String contructors and operator=:
233+
// duplicate String constructors and operator=:
234234

235235
StreamString(const char* text = nullptr): String(text), S2Stream(this) { }
236236
StreamString(const String& string): String(string), S2Stream(this) { }

cores/esp8266/Updater.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ size_t UpdaterClass::write(uint8_t *data, size_t len) {
410410
left -= toBuff;
411411
if(!_async) yield();
412412
}
413-
//lets see whats left
413+
//lets see what's left
414414
memcpy(_buffer + _bufferLen, data + (len - left), left);
415415
_bufferLen += left;
416416
if(_bufferLen == remaining()){

cores/esp8266/Updater.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ class UpdaterClass {
108108
bool setMD5(const char * expected_md5);
109109

110110
/*
111-
returns the MD5 String of the sucessfully ended firmware
111+
returns the MD5 String of the successfully ended firmware
112112
*/
113113
String md5String(void){ return _md5.toString(); }
114114

115115
/*
116-
populated the result with the md5 bytes of the sucessfully ended firmware
116+
populated the result with the md5 bytes of the successfully ended firmware
117117
*/
118118
void md5(uint8_t * result){ return _md5.getBytes(result); }
119119

cores/esp8266/core_esp8266_i2s.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ void i2s_set_dividers(uint8_t div1, uint8_t div2) {
483483
i2sc_temp |= (I2STXR); // Hold transmitter in reset
484484
I2SC = i2sc_temp;
485485

486-
// trans master(active low), recv master(active_low), !bits mod(==16 bits/chanel), clear clock dividers
486+
// trans master(active low), recv master(active_low), !bits mod(==16 bits/channel), clear clock dividers
487487
i2sc_temp &= ~(I2STSM | I2SRSM | (I2SBMM << I2SBM) | (I2SBDM << I2SBD) | (I2SCDM << I2SCD));
488488

489489
// I2SRF = Send/recv right channel first (? may be swapped form I2S spec of WS=0 => left)

cores/esp8266/core_esp8266_main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ void init_done() {
290290
know if other features are using this, or if this memory is going to be
291291
used in future SDK releases.
292292
293-
WPS beeing flawed by its poor security, or not beeing used by lots of
293+
WPS being flawed by its poor security, or not being used by lots of
294294
users, it has been decided that we are still going to use that memory for
295295
user's stack and disable the use of WPS.
296296

cores/esp8266/core_esp8266_noniso.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
core_esp8266_noniso.c - nonstandard (but usefull) conversion functions
2+
core_esp8266_noniso.c - nonstandard (but useful) conversion functions
33
44
Copyright (c) 2014 Ivan Grokhotkov. All rights reserved.
55
This file is part of the esp8266 core for Arduino environment.

cores/esp8266/core_esp8266_phy.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ static const uint8_t ICACHE_FLASH_ATTR phy_init_data[128] =
289289
};
290290

291291

292-
// These functions will be overriden from C++ code.
292+
// These functions will be overridden from C++ code.
293293
// Unfortunately, we can't use extern "C" because Arduino preprocessor
294294
// doesn't generate forward declarations for extern "C" functions correctly,
295295
// so we use mangled names here.

cores/esp8266/core_esp8266_spi_utils.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ _SPICommand(volatile uint32_t spiIfNum,
5656
if (spiIfNum>1)
5757
return SPI_RESULT_ERR;
5858

59-
// force SPI register access via base+offest.
59+
// force SPI register access via base+offset.
6060
// Prevents loading individual address constants from flash.
6161
uint32_t *spibase = (uint32_t*)(spiIfNum ? &(SPI1CMD) : &(SPI0CMD));
6262
#define SPIREG(reg) (*((volatile uint32_t *)(spibase+(&(reg) - &(SPI0CMD)))))
@@ -141,7 +141,7 @@ _SPICommand(volatile uint32_t spiIfNum,
141141
* data has been sent.
142142
*
143143
* Note: This code has only been tested with SPI bus 0, but should work
144-
* equally well with other busses. The ESP8266 has bus 0 and 1,
144+
* equally well with other buses. The ESP8266 has bus 0 and 1,
145145
* newer chips may have more one day.
146146
*/
147147
SpiOpResult SPI0Command(uint8_t cmd, uint32_t *data, uint32_t mosi_bits, uint32_t miso_bits) {

cores/esp8266/core_esp8266_version.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/*
32
core_esp8266_version.h - parse "git describe" at compile time
43
Copyright (c) 2018 david gauchard. All rights reserved.
@@ -159,7 +158,7 @@ int coreVersionSubRevision ()
159158
}
160159

161160
/*
162-
* unique revision indentifier (never decreases)
161+
* unique revision identifier (never decreases)
163162
*/
164163
constexpr
165164
int coreVersionNumeric ()

cores/esp8266/core_esp8266_wiring.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ void micros_overflow_tick(void* arg) {
6969
//---------------------------------------------------------------------------
7070
// millis() 'magic multiplier' approximation
7171
//
72-
// This function corrects the cumlative (296us / usec overflow) drift
73-
// seen in the orignal 'millis()' function.
72+
// This function corrects the cumulative (296us / usec overflow) drift
73+
// seen in the original 'millis()' function.
7474
//
7575
// Input:
7676
// 'm' - 32-bit usec counter, 0 <= m <= 0xFFFFFFFF

cores/esp8266/esp8266_peri.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ extern volatile uint32_t* const esp8266_gpioToFn[16];
163163
#define TCIS 8 //Interrupt Status
164164
#define TCTE 7 //Timer Enable
165165
#define TCAR 6 //AutoReload (restart timer when condition is reached)
166-
#define TCPD 2 //Prescale Devider (2bit) 0:1(12.5ns/tick), 1:16(0.2us/tick), 2/3:256(3.2us/tick)
166+
#define TCPD 2 //Prescale Divider (2bit) 0:1(12.5ns/tick), 1:16(0.2us/tick), 2/3:256(3.2us/tick)
167167
#define TCIT 0 //Interrupt Type 0:edge, 1:level
168168

169169
//RTC Registers
@@ -271,7 +271,7 @@ extern volatile uint32_t* const esp8266_gpioToFn[16];
271271
#define UCRXI 19 //Invert RX
272272
#define UCTXRST 18 //Reset TX FIFO
273273
#define UCRXRST 17 //Reset RX FIFO
274-
#define UCTXHFE 15 //TX Harware Flow Enable
274+
#define UCTXHFE 15 //TX Hardware Flow Enable
275275
#define UCLBE 14 //LoopBack Enable
276276
#define UCBRK 8 //Send Break on the TX line
277277
#define UCSWDTR 7 //Set this bit to assert DTR
@@ -283,11 +283,11 @@ extern volatile uint32_t* const esp8266_gpioToFn[16];
283283

284284
//UART CONF1 Registers Bits
285285
#define UCTOE 31 //RX TimeOut Enable
286-
#define UCTOT 24 //RX TimeOut Treshold (7bit)
287-
#define UCRXHFE 23 //RX Harware Flow Enable
288-
#define UCRXHFT 16 //RX Harware Flow Treshold (7bit)
289-
#define UCFET 8 //TX FIFO Empty Treshold (7bit)
290-
#define UCFFT 0 //RX FIFO Full Treshold (7bit)
286+
#define UCTOT 24 //RX TimeOut Threshold (7bit)
287+
#define UCRXHFE 23 //RX Hardware Flow Enable
288+
#define UCRXHFT 16 //RX Hardware Flow Threshold (7bit)
289+
#define UCFET 8 //TX FIFO Empty Threshold (7bit)
290+
#define UCFFT 0 //RX FIFO Full Threshold (7bit)
291291

292292
//WDT Feed (the dog) Register
293293
#define WDTFEED ESP8266_REG(0x914)
@@ -372,7 +372,7 @@ extern volatile uint32_t* const esp8266_gpioToFn[16];
372372
#define SPI1E3 ESP8266_REG(0x1FC)
373373
#define SPI1W(p) ESP8266_REG(0x140 + ((p & 0xF) * 4))
374374

375-
//SPI0, SPI1 & I2S Interupt Register
375+
//SPI0, SPI1 & I2S Interrupt Register
376376
#define SPIIR ESP8266_DREG(0x20)
377377
#define SPII0 4 //SPI0 Interrupt
378378
#define SPII1 7 //SPI1 Interrupt

cores/esp8266/esp8266_undocumented.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ typedef void (*fn_c_exception_handler_t)(struct __exception_frame *ef, int cause
185185
_xtos_c_handler_table[]. It is present when an exception handler has not been
186186
registered. It simply consist of a single instruction, `ret`.
187187
It is also internally used by `_xtos_set_exception_handler(cause, NULL)` to
188-
reset a "C" exception handler back to the unhandled state. The coresponding
188+
reset a "C" exception handler back to the unhandled state. The corresponding
189189
`_xtos_exc_handler_table` entry will be set to `_xtos_unhandled_exception`.
190190
Note, if nesting handlers is desired this must be implemented in the new "C"
191191
exception handler(s) being registered.

cores/esp8266/exc-sethandler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
* https://github.com/qca/open-ath9k-htc-firmware/blob/master/sboot/magpie_1_1/sboot/athos/src/xtos/exc-sethandler.c
4848
*
4949
* It has been revised to use Arduino ESP8266 core includes, types, and
50-
* formating.
50+
* formatting.
5151
*/
5252

5353
/* exc-sethandler.c - register an exception handler in XTOS */

0 commit comments

Comments
 (0)