Skip to content

Commit 375f6fb

Browse files
authored
Merge pull request #1554 from fpistm/codespell
ci: add codespell action
2 parents a1fde7f + 8c66218 commit 375f6fb

File tree

49 files changed

+179
-118
lines changed

Some content is hidden

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

49 files changed

+179
-118
lines changed

.github/workflows/CodeSpell.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: codespell
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
jobs:
11+
codespell:
12+
name: Check for spelling errors
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
# See: https://github.com/codespell-project/actions-codespell/blob/master/README.md
20+
- name: Spell check
21+
uses: codespell-project/actions-codespell@master
22+
with:
23+
check_filenames: true
24+
check_hidden: true
25+
# In the event of a false positive, add the word in all lower case to this file:
26+
ignore_words_file: ./CI/codespell/.codespellignore
27+
skip: ./.git,./CI,./system/Drivers,./system/Middlewares

CI/codespell/.codespellignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
busses
2+
dout
3+
exten
4+
hart
5+
hsi
6+
noe
7+
nwe
8+

CI/codespell/.codespellrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[codespell]
2+
check-filenames =
3+
check-hidden =
4+
skip = ./.git,./CI,./system/Drivers,./system/Middlewares
5+
ignore-words = ./CI/codespell/.codespellignore

CI/codespell/codespell.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## [codespell]
2+
3+
[codespell] is used to check common misspellings and fix them.
4+
5+
To execute it within this repository, it has to be installed first, see [installation](https://github.com/codespell-project/codespell#installation).
6+
Then run from the root folder this command using the configuration file:
7+
8+
* Linux or equivalent:
9+
10+
```console
11+
codespell --config ./CI/codespell/.codespellrc
12+
```
13+
14+
* Windows
15+
16+
```console
17+
codespell.exe --config .\CI\codespell\.codespellrc
18+
```
19+
20+
21+
[codespell]: https://github.com/codespell-project/codespell

CI/update/stm32cube.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
hal_dest_path = system_dest_path / hal_src_path
4343
cmsis_dest_path = system_dest_path / hal_src_path / "CMSIS" / "Device" / "ST"
4444

45-
stm32_list = [] # Serie
45+
stm32_list = [] # series
4646
cube_versions = collections.OrderedDict() # key: serie name, value: cube version
4747
cube_HAL_versions = collections.OrderedDict() # key: serie name, value: HAL version
4848
cube_CMSIS_versions = collections.OrderedDict() # key: serie name, value: CMSIS version

CI/update/stm32variant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,7 @@ def aggregate_dir():
20122012
# Get all mcu_dir
20132013
mcu_dirs = sorted(mcu_family.glob("*/"))
20142014

2015-
# Group mcu directories when only expressions and xml file name are differents
2015+
# Group mcu directories when only expressions and xml file name are different
20162016
while mcu_dirs:
20172017
# Pop first item
20182018
group_mcu_dir = [mcu_dirs.pop(0)]

CI/utils/pathlib_ext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def copyFile(src, dest):
3636

3737

3838
def genSTM32List(path, pattern):
39-
stm32_list = [] # Serie
39+
stm32_list = [] # series
4040
dir_pattern = re.compile(r"^STM32(.*)xx_HAL_Driver$", re.IGNORECASE)
4141

4242
if pattern is not None:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To report a bug/request please file an issue in the right repository
99
(example for [Arduino_Core_STM32](https://github.com/stm32duino/Arduino_Core_STM32/issues/new/choose)).
1010
But check the following boxes before posting an issue:
1111

12-
- [ ] `Make sure you are using the latest STM32 core and libraries versions.` See [lastest core here](https://github.com/stm32duino/Arduino_Core_STM32/releases/latest).
12+
- [ ] `Make sure you are using the latest STM32 core and libraries versions.` See [latest core here](https://github.com/stm32duino/Arduino_Core_STM32/releases/latest).
1313
- [ ] `Your issue is NOT a question/feedback/suggestions.` This should be discussed on the [stm32duino forum](http://stm32duino.com):
1414
* questions on the [STM32 Core](http://stm32duino.com/viewforum.php?f=35).
1515
* bugs/enhancements on the [STM core: Bugs and enhancements](http://stm32duino.com/viewforum.php?f=38).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![forums](https://img.shields.io/badge/join-the%20forums-blue.svg)](https://www.stm32duino.com/)
33
[![wiki](https://img.shields.io/badge/browse-the%20wiki-orange.svg)](https://github.com/stm32duino/wiki/wiki)
44
[![STM32 Core Continuous Integration](https://github.com/stm32duino/Arduino_Core_STM32/workflows/STM32%20Core%20Continuous%20Integration/badge.svg?branch=main)](https://github.com/stm32duino/Arduino_Core_STM32/actions)
5-
5+
[![codespell](https://github.com/stm32duino/Arduino_Core_STM32/workflows/codespell/badge.svg)](https://github.com/stm32duino/Arduino_Core_STM32/actions?workflow=codespell)
66

77

88
[![GitHub release](https://img.shields.io/github/release/stm32duino/Arduino_Core_STM32.svg)](https://github.com/stm32duino/Arduino_Core_STM32/releases/latest)

cores/arduino/HardwareSerial.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ HardwareSerial::HardwareSerial(void *peripheral, HalfDuplexMode_t halfDuplex)
265265
setTx(PIN_SERIALLP2_TX);
266266
} else
267267
#endif
268-
// else get the pins of the first peripheral occurence in PinMap
268+
// else get the pins of the first peripheral occurrence in PinMap
269269
{
270270
_serial.pin_rx = pinmap_pin(peripheral, PinMap_UART_RX);
271271
_serial.pin_tx = pinmap_pin(peripheral, PinMap_UART_TX);
@@ -485,7 +485,7 @@ void HardwareSerial::flush()
485485
// nop, the interrupt handler will free up space for us
486486
}
487487
// If we get here, nothing is queued anymore (DRIE is disabled) and
488-
// the hardware finished tranmission (TXC is set).
488+
// the hardware finished transmission (TXC is set).
489489
}
490490

491491
size_t HardwareSerial::write(const uint8_t *buffer, size_t size)

0 commit comments

Comments
 (0)