github/workflows: Move codespell to a GitHub workflow, version it.
Similar to ruff.yaml, it's simpler to run the codespell command directly
from a workflow file. And developers can run codespell directly from the
command line without the need for options, or just use pre-commit.
This commit also applies a specific version to codespell, same as
pre-commit (introduced in a166d805f4
).
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
parent
b038d07011
commit
84e90639fa
10
.github/workflows/code_formatting.yml
vendored
10
.github/workflows/code_formatting.yml
vendored
@ -18,13 +18,3 @@ jobs:
|
||||
run: source tools/ci.sh && ci_c_code_formatting_run
|
||||
- name: Check code formatting
|
||||
run: git diff --exit-code
|
||||
|
||||
code-spelling:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
- name: Install packages
|
||||
run: source tools/ci.sh && ci_code_spell_setup
|
||||
- name: Run spell checker
|
||||
run: source tools/ci.sh && ci_code_spell_run
|
||||
|
12
.github/workflows/codespell.yml
vendored
Normal file
12
.github/workflows/codespell.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
name: Check spelling with codespell
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
codespell:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: pip install --user codespell==2.2.6 tomli
|
||||
- run: codespell
|
||||
|
11
tools/ci.sh
11
tools/ci.sh
@ -30,17 +30,6 @@ function ci_c_code_formatting_run {
|
||||
tools/codeformat.py -v -c
|
||||
}
|
||||
|
||||
########################################################################################
|
||||
# code spelling
|
||||
|
||||
function ci_code_spell_setup {
|
||||
pip3 install codespell tomli
|
||||
}
|
||||
|
||||
function ci_code_spell_run {
|
||||
codespell
|
||||
}
|
||||
|
||||
########################################################################################
|
||||
# commit formatting
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user