Skip to content

Commit eb7fcbf

Browse files
committed
ci: add codespell action
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent a1fde7f commit eb7fcbf

File tree

5 files changed

+62
-1
lines changed

5 files changed

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

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)

0 commit comments

Comments
 (0)