Skip to content

Commit 18982c1

Browse files
committed
Replace woke with codespell
1 parent 154fae6 commit 18982c1

File tree

9 files changed

+44
-26
lines changed

9 files changed

+44
-26
lines changed

inventory/group_vars/active_roles.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
present_files:
22
- .github/dependabot.yml
33
- .github/pull_request_template.md
4+
- .codespellrc
45
- .commitlintrc.js
56
- .fmf/version
67
- .markdownlint.yaml
@@ -17,13 +18,13 @@ present_templates:
1718
- .github/workflows/ansible-test.yml
1819
- .github/workflows/build_docs.yml
1920
- .github/workflows/changelog_to_tag.yml
21+
- .github/workflows/codespell.yml
2022
- .github/workflows/markdownlint.yml
2123
- .github/workflows/pr-title-lint.yml
2224
- .github/workflows/test_converting_readme.yml
2325
- .github/workflows/tft.yml
2426
- .github/workflows/tft_citest_bad.yml
2527
- .github/workflows/weekly_ci.yml
26-
- .github/workflows/woke.yml
2728
- README-ansible.md
2829
- tests/vars/rh_distros_vars.yml
2930
absent_files:
@@ -39,6 +40,7 @@ absent_files:
3940
- .github/actions/custom-woke-action/testdata/bad.txt
4041
- .github/actions/custom-woke-action
4142
- .github/actions
43+
- .github/workflows/woke.yml
4244
- plans/README-plans.md
4345
- plans/general.fmf
4446
- plans

inventory/host_vars/ha_cluster.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ role_present_templates:
1313
# to shut up
1414
ansible_lint:
1515
skip_list:
16-
- sanity[cannot-ignore] # wokeignore:rule=sanity
16+
- sanity[cannot-ignore]

inventory/host_vars/timesync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ github_actions:
77
# ignores
88
ansible_lint:
99
skip_list:
10-
- sanity[cannot-ignore] # wokeignore:rule=sanity
10+
- sanity[cannot-ignore]
1111
extra_vars:
1212
targets: target_hosts

inventory/host_vars/vpn.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ github_actions:
77
- cron: "8 10 * * 3"
88
ansible_lint:
99
skip_list:
10-
- sanity[cannot-ignore] # wokeignore:rule=sanity
10+
- sanity[cannot-ignore]

playbooks/files/.codespellrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[codespell]
2+
builtin = usage
3+
ignore-multiline-regex = codespell:ignore-begin.*codespell:ignore-end
4+
context=0

playbooks/templates/.ansible-lint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ kinds:
3030
{% if val %}
3131
{{ param }}:
3232
{% for item in val %}
33-
- {{ item }}{% if item is search("sanity") %} # wokeignore:rule=sanity{% endif %}
33+
- {{ item }}
3434

3535
{% endfor %}
3636
{% endif %}

playbooks/templates/.github/workflows/ansible-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Run ansible-test
4444
uses: ansible-community/ansible-test-gh-action@release/v1
4545
with:
46-
testing-type: sanity # wokeignore:rule=sanity
46+
testing-type: sanity
4747
ansible-core-version: stable-2.17
4848
{%- raw %}
4949
collection-src-directory: ${{ github.workspace }}/.tox/ansible_collections/${{ env.LSR_ROLE2COLL_NAMESPACE }}/${{ env.LSR_ROLE2COLL_NAME }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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: {{ gha_checkout_action }}
15+
16+
- name: Get variable with regex values
17+
id: regexvar
18+
run: |
19+
curl -L -s -o dictionary_usage.txt https://raw.githubusercontent.com/codespell-project/codespell/refs/heads/main/codespell_lib/data/dictionary_usage.txt
20+
regexvar=$(sed 's/->.*//g' dictionary_usage.txt | sed 's/$/|/' | tr -d '\n' | sed 's/.$//')
21+
rm dictionary_usage.txt
22+
echo "regexvar=$regexvar" >> "$GITHUB_OUTPUT"
23+
24+
- name: Show errors from codespell as annotation in GitHub Actions
25+
uses: codespell-project/codespell-problem-matcher@v1
26+
27+
{%- raw %}
28+
- name: Codespell
29+
uses: spetrosi/actions-codespell@add-regex-input
30+
with:
31+
regex: ${{ steps.regexvar.outputs.regexvar }}
32+
{%- endraw +%}

playbooks/templates/.github/workflows/woke.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)