Skip to content

Commit 499aeed

Browse files
authored
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 0798188 commit 499aeed

11 files changed

+33
-8
lines changed

Diff for: .codespell_ignores

Whitespace-only changes.

Diff for: .codespellrc

+8
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

Diff for: .github/workflows/codespell.yml

+17
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

Diff for: .github/workflows/tft_citest_bad.yml

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

Diff for: .gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ variables:
3939
rules:
4040
- if: $BASE_IMAGE_NAME !~ /^LsrRhel8.*/
4141

42-
# Linting / code formating that either works the same on all images or using
42+
# Linting / code formatting that either works the same on all images or using
4343
# the newest linter / formatter is desired
4444
# Rhel9 can be dropped once Rhel10 is stable
4545
.job_generic_linter:

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ha_cluster
22

3-
[![ansible-lint.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/ansible-test.yml) [![codeql.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/codeql.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/codeql.yml) [![markdownlint.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/markdownlint.yml) [![python-unit-test.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/python-unit-test.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/python-unit-test.yml) [![shellcheck.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/shellcheck.yml) [![tft.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/woke.yml)
3+
[![ansible-lint.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/ansible-test.yml) [![codeql.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/codeql.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/codeql.yml) [![codespell.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/codespell.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/codespell.yml) [![markdownlint.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/markdownlint.yml) [![python-unit-test.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/python-unit-test.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/python-unit-test.yml) [![shellcheck.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/shellcheck.yml) [![tft.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/ha_cluster/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/ha_cluster/actions/workflows/woke.yml)
44

55
An Ansible role for managing High Availability Clustering.
66

Diff for: library/ha_cluster_info.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def export_cluster_configuration(module: AnsibleModule) -> Dict[str, Any]:
110110
corosync_enabled, pacemaker_enabled
111111
)
112112

113-
# Corosync config is availabe via CLI since pcs-0.10.8, via API v2 since
113+
# Corosync config is available via CLI since pcs-0.10.8, via API v2 since
114114
# pcs-0.12.0 and pcs-0.11.9. For old pcs versions, CLI must be used, and
115115
# there is no benefit in implementing access via API on top of that.
116116
# No need to check pcs capabilities. If this is not supported by pcs,

Diff for: tasks/shell_crmsh/check-and-prepare-role-variables.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
| map('length') | unique | length > 1
2626
run_once: true
2727

28-
# Running a qnetd on a cluster node does't make sense, fencing would make
28+
# Running a qnetd on a cluster node doesn't make sense, fencing would make
2929
# the qnetd unavailable, even if temporarily.
3030
- name: Fail if configuring qnetd on a cluster node
3131
ansible.builtin.fail:

Diff for: tasks/shell_pcs/check-and-prepare-role-variables.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
| map('length') | unique | length > 1
8080
run_once: true
8181

82-
# Running a qnetd on a cluster node does't make sense, fencing would make
82+
# Running a qnetd on a cluster node doesn't make sense, fencing would make
8383
# the qnetd unavailable, even if temporarily.
8484
- name: Fail if configuring qnetd on a cluster node
8585
fail:

Diff for: tests/tests_sbd_check_devices_count_combined.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
# Generate an "inventory" variable for each node.
4444
# Number of SBD devices is the same for all nodes. This is expected to
45-
# be overriden with the play variable in the role.
45+
# be overridden with the play variable in the role.
4646
- name: Set SBD devices variable
4747
set_fact:
4848
ha_cluster:

Diff for: tests/unit/test_pcs_api_v2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
class Pcs(TestCase):
2828
cmd_name = "some pcs command"
29-
cmd_params = dict(some="option", another=["opti", "ons"])
29+
cmd_params = dict(some="option", another=["opti", "owns"])
3030
cmd_options = CommandOptionsDto(request_timeout=60)
3131
cmd_dto = CommandDto(cmd_name, cmd_params, cmd_options)
3232

0 commit comments

Comments
 (0)