Skip to content

Commit f28c792

Browse files
authored
ci: Check spelling with codespell (#41)
* ci: Check spelling with codespell * You can ignore words inline by adding a comment like `# codespell:ignore word`. * You can ignore words by adding them to the `.codespell_ignores` file. * You can ignore files and directories by adding them with `skip = ` to the `.codespellrc` file. Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
1 parent e236426 commit f28c792

File tree

5 files changed

+27
-2
lines changed

5 files changed

+27
-2
lines changed

.codespell_ignores

Whitespace-only changes.

.codespellrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[codespell]
2+
check-hidden = true
3+
# Note that `-w` doesn't work when ignore-multiline-regex is set
4+
# https://github.com/codespell-project/codespell/issues/3642
5+
ignore-multiline-regex = codespell:ignore-begin.*codespell:ignore-end
6+
ignore-words = .codespell_ignores
7+
# skip-file is not available https://github.com/codespell-project/codespell/pull/2759
8+
skip = .pandoc_template.html5,.README.html

.github/workflows/codespell.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Codespell configuration is within .codespellrc
2+
---
3+
name: Codespell
4+
on: # yamllint disable-line rule:truthy
5+
- pull_request
6+
permissions:
7+
contents: read
8+
jobs:
9+
codespell:
10+
name: Check for spelling errors
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Codespell
17+
uses: codespell-project/actions-codespell@v2

.github/workflows/tft_citest_bad.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
RUN_ID=$(gh api "repos/$REPO/actions/workflows/tft.yml/runs?event=issue_comment" \
3737
| jq -r "[.workflow_runs[] | select( .display_title == \"$PR_TITLE\" ) | select( .conclusion == \"failure\" ) | .id][0]")
3838
if [ "$RUN_ID" = "null" ]; then
39-
echo "Failed workflow not found, exitting"
39+
echo "Failed workflow not found, exiting"
4040
exit 1
4141
fi
4242
echo "Re-running workflow $RUN_ID"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,4 +463,4 @@ See README-ostree.md
463463
MIT
464464

465465
Based on [Ansible-sudoers](https://github.com/ahuffman/ansible-sudoers).
466-
[![ansible-lint.yml](https://github.com/linux-system-roles/sudo/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/sudo/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/ansible-test.yml) [![codeql.yml](https://github.com/linux-system-roles/sudo/actions/workflows/codeql.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/codeql.yml) [![markdownlint.yml](https://github.com/linux-system-roles/sudo/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/markdownlint.yml) [![python-unit-test.yml](https://github.com/linux-system-roles/sudo/actions/workflows/python-unit-test.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/python-unit-test.yml) [![shellcheck.yml](https://github.com/linux-system-roles/sudo/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/shellcheck.yml) [![tft.yml](https://github.com/linux-system-roles/sudo/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/sudo/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/sudo/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/woke.yml)
466+
[![ansible-lint.yml](https://github.com/linux-system-roles/sudo/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/sudo/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/ansible-test.yml) [![codeql.yml](https://github.com/linux-system-roles/sudo/actions/workflows/codeql.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/codeql.yml) [![codespell.yml](https://github.com/linux-system-roles/sudo/actions/workflows/codespell.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/codespell.yml) [![markdownlint.yml](https://github.com/linux-system-roles/sudo/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/markdownlint.yml) [![python-unit-test.yml](https://github.com/linux-system-roles/sudo/actions/workflows/python-unit-test.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/python-unit-test.yml) [![shellcheck.yml](https://github.com/linux-system-roles/sudo/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/shellcheck.yml) [![tft.yml](https://github.com/linux-system-roles/sudo/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/sudo/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/sudo/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/sudo/actions/workflows/woke.yml)

0 commit comments

Comments
 (0)