Skip to content

Commit

Permalink
ci: Replace woke with codespell
Browse files Browse the repository at this point in the history
woke has been left with Noriko's and all other PRs not being reviewed for years,
hence we have been using our fork.

Replacing woke with codespell that provides a dictionary for replacing phrasing
with recommended terms:
https://github.com/codespell-project/codespell/blob/main/codespell_lib/data/dictionary_usage.txt

It also supports using custom dictionaries so we can add to the list if we want

For more information about inclusive naming initiative, see
https://inclusivenaming.org/about/

Codespell also checks spelling, which is an advantage for system roles because a
big part of our code is user-facing - task names, debug messages, readmes.

`ignore-multiline-regex` in the `.codespellrc` config allows for disabling
codespell for a block of lines:

```
# codespell:ignore-begin
... codespell will not look at this text.
# codespell:ignore-end
```

Signed-off-by: Sergei Petrosian <[email protected]>
  • Loading branch information
spetrosi committed Feb 4, 2025
1 parent 82c6e00 commit 4becff7
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,5 @@ jobs:
regexvar=$(sed 's/->.*//g' dictionary_usage.txt | sed 's/$/|/' | tr -d '\n' | sed 's/.$//')
echo "$regexvar"
echo "regexvar=$regexvar" >> "$GITHUB_OUTPUT"
- name: Annotate locations with typos
uses: codespell-project/codespell-problem-matcher@v1
with:
regex: ${{ steps.regexvar.outputs.regexvar }}

- name: Codespell
uses: codespell-project/actions-codespell@v2
with:
regex: ${{ steps.regexvar.outputs.regexvar }}
- name: Run codespell
run: codespell tasks/main.yml --regex ${{ steps.regexvar.outputs.regexvar }} -C0

0 comments on commit 4becff7

Please sign in to comment.