Skip to content

Commit 612f440

Browse files
authored
Merge pull request #4 from arduino/spell-check
Add CI workflow to check for commonly misspelled words
2 parents 80d87c8 + 83c53c4 commit 612f440

File tree

6 files changed

+94
-0
lines changed

6 files changed

+94
-0
lines changed

.codespellrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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 = pullrequest
5+
builtin = clear,informal,en-GB_to_en-US
6+
check-filenames =
7+
check-hidden =
8+
skip = ./.git,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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: Install Python
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: "3.9"
25+
26+
- name: Install Poetry
27+
run: pip install poetry
28+
29+
- name: Install Task
30+
uses: arduino/actions/setup-taskfile@master
31+
with:
32+
repo-token: ${{ secrets.GITHUB_TOKEN }}
33+
version: 3.x
34+
35+
- name: Spell check
36+
run: task general:check-spelling

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[![Check Go status](https://github.com/arduino/libraries-repository-engine/actions/workflows/check-go.yml/badge.svg)](https://github.com/arduino/libraries-repository-engine/actions/workflows/check-go.yml)
2+
[![Spell Check status](https://github.com/arduino/libraries-repository-engine/actions/workflows/spell-check-task.yml/badge.svg)](https://github.com/arduino/libraries-repository-engine/actions/workflows/spell-check-task.yml)
23

34
BUILD
45
----------------------------

Taskfile.yml

+12
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,15 @@ tasks:
4646
desc: Format Go code
4747
cmds:
4848
- go fmt {{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}}
49+
50+
general:check-spelling:
51+
desc: Check for commonly misspelled words
52+
cmds:
53+
- poetry install --no-root
54+
- poetry run codespell
55+
56+
general:correct-spelling:
57+
desc: Correct commonly misspelled words where possible
58+
cmds:
59+
- poetry install --no-root
60+
- poetry run codespell --write-changes

poetry.lock

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[tool.poetry]
2+
name = "libraries-repository-engine"
3+
version = "0.0.0"
4+
description = ""
5+
authors = ["Arduino <[email protected]>"]
6+
7+
[tool.poetry.dependencies]
8+
python = "^3.9"
9+
10+
[tool.poetry.dev-dependencies]
11+
codespell = "^2.0.0"
12+
13+
[build-system]
14+
requires = ["poetry-core>=1.0.0"]
15+
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)