From b975743b885f1405017ca7142711f740493bdede Mon Sep 17 00:00:00 2001 From: Sergei Petrosian Date: Wed, 12 Feb 2025 12:54:20 +0100 Subject: [PATCH 1/2] 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 --- .codespell_ignores | 0 .codespellrc | 8 ++++++++ .github/workflows/codespell.yml | 17 +++++++++++++++++ .github/workflows/tft_citest_bad.yml | 2 +- .pandoc_template.html5 | 2 +- README.md | 2 +- 6 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 .codespell_ignores create mode 100644 .codespellrc create mode 100644 .github/workflows/codespell.yml diff --git a/.codespell_ignores b/.codespell_ignores new file mode 100644 index 00000000..e69de29b diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..2bf9755e --- /dev/null +++ b/.codespellrc @@ -0,0 +1,8 @@ +[codespell] +check-hidden = true +# Note that `-w` doesn't work when ignore-multiline-regex is set +# https://github.com/codespell-project/codespell/issues/3642 +ignore-multiline-regex = codespell:ignore-begin.*codespell:ignore-end +ignore-words = .codespell_ignores +# skip-file is not available https://github.com/codespell-project/codespell/pull/2759 +skip = .README.html diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..8eadb612 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -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 diff --git a/.github/workflows/tft_citest_bad.yml b/.github/workflows/tft_citest_bad.yml index 85db1f44..9f48f353 100644 --- a/.github/workflows/tft_citest_bad.yml +++ b/.github/workflows/tft_citest_bad.yml @@ -36,7 +36,7 @@ jobs: RUN_ID=$(gh api "repos/$REPO/actions/workflows/tft.yml/runs?event=issue_comment" \ | jq -r "[.workflow_runs[] | select( .display_title == \"$PR_TITLE\" ) | select( .conclusion == \"failure\" ) | .id][0]") if [ "$RUN_ID" = "null" ]; then - echo "Failed workflow not found, exitting" + echo "Failed workflow not found, exiting" exit 1 fi echo "Re-running workflow $RUN_ID" diff --git a/.pandoc_template.html5 b/.pandoc_template.html5 index f2146610..1be9b788 100644 --- a/.pandoc_template.html5 +++ b/.pandoc_template.html5 @@ -25,7 +25,7 @@ Copyright (c) 2017 GitHub Inc. "GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017-2020, released under the MIT License (MIT); it contains readaptations of substantial -portions of the following third party softwares: +portions of the following third party software: (1) "GitHub Markdown CSS", Copyright (c) Sindre Sorhus, MIT License (MIT). (2) "Primer CSS", Copyright (c) 2016 GitHub Inc., MIT License (MIT). diff --git a/README.md b/README.md index e19e1058..ddd131c7 100644 --- a/README.md +++ b/README.md @@ -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) [![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) Role for managing TLS/SSL certificate issuance and renewal From a79d664b8449746a63d5f6983787f0af70dfc676 Mon Sep 17 00:00:00 2001 From: Sergei Petrosian Date: Wed, 12 Feb 2025 12:58:02 +0100 Subject: [PATCH 2/2] chore: Fix spelling --- module_utils/certificate_lsr/providers/base.py | 2 +- pylintrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module_utils/certificate_lsr/providers/base.py b/module_utils/certificate_lsr/providers/base.py index 4a514678..c32a88af 100644 --- a/module_utils/certificate_lsr/providers/base.py +++ b/module_utils/certificate_lsr/providers/base.py @@ -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 diff --git a/pylintrc b/pylintrc index 81ae6dfe..046ff1cd 100644 --- a/pylintrc +++ b/pylintrc @@ -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