Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Replace woke with codespell #257

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .codespell_ignores
Empty file.
4 changes: 4 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[codespell]
ignore-multiline-regex = codespell:ignore-begin.*codespell:ignore-end
context = 0
ignore-words = .codespell_ignores
2 changes: 1 addition & 1 deletion .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ jobs:
- name: Run ansible-test
uses: ansible-community/ansible-test-gh-action@release/v1
with:
testing-type: sanity # wokeignore:rule=sanity
testing-type: sanity
ansible-core-version: stable-2.17
collection-src-directory: ${{ github.workspace }}/.tox/ansible_collections/${{ env.LSR_ROLE2COLL_NAMESPACE }}/${{ env.LSR_ROLE2COLL_NAME }}
17 changes: 17 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Codespell configuration is within .codespellrc
---
name: Codespell
on: # yamllint disable-line rule:truthy
- pull_request
permissions:
contents: read
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Codespell
uses: codespell-project/actions-codespell@v2
27 changes: 27 additions & 0 deletions .github/workflows/detect_non_inclusive_language.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Codespell configuration is within .codespellrc
---
name: Detect non-inclusive language
on: # yamllint disable-line rule:truthy
- pull_request
permissions:
contents: read
jobs:
codespell:
name: Detect non-inclusive language
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get variable with regex values
id: regexvar
run: |
curl -L -s -o dictionary_usage.txt https://raw.githubusercontent.com/codespell-project/codespell/refs/heads/main/codespell_lib/data/dictionary_usage.txt
regexvar=$(sed 's/->.*//g' dictionary_usage.txt | sed 's/$/|/' | tr -d '\n' | sed 's/.$//')
rm dictionary_usage.txt
echo "regex = $regexvar" >> .codespellrc

- name: Detect non-inclusive language with codespell
uses: codespell-project/actions-codespell@v2
with:
builtin: usage
20 changes: 0 additions & 20 deletions .github/workflows/woke.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Certificate System Role

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

Role for managing TLS/SSL certificate issuance and renewal

Expand Down
2 changes: 1 addition & 1 deletion module_utils/certificate_lsr/providers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ def _write_param_to_file_if_diff(self, param_name, filepath, check_mode):

# Changes needs to be performed.

# If check mode return withot modifications
# If check mode return without modifications
if check_mode:
return True

Expand Down
8 changes: 4 additions & 4 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-whitelist=
extension-pkg-whitelist= # codespell:ignore whitelist

# Add files or directories to the blacklist. They should be base names, not
# Add files or directories to the blocklist. They should be base names, not
# paths.
ignore=.git,.tox

# Add files or directories matching the regex patterns to the blacklist. The
# Add files or directories matching the regex patterns to the blocklist. The
# regex matches against base names, not paths.
ignore-patterns=

Expand Down Expand Up @@ -55,7 +55,7 @@ confidence=
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# disable everything first and then re-enable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
Expand Down