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..6f19792a --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +[codespell] +check-hidden = true +# https://github.com/codespell-project/codespell/issues/3642 +ignore-words = .codespell_ignores +# skip-file is not available https://github.com/codespell-project/codespell/pull/2759 +skip = .pandoc_template.html5,.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/README.md b/README.md index dafd361f..9ba8e3a0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Linux Storage Role -[![ansible-lint.yml](https://github.com/linux-system-roles/storage/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/storage/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/ansible-test.yml) [![codeql.yml](https://github.com/linux-system-roles/storage/actions/workflows/codeql.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/codeql.yml) [![markdownlint.yml](https://github.com/linux-system-roles/storage/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/markdownlint.yml) [![python-unit-test.yml](https://github.com/linux-system-roles/storage/actions/workflows/python-unit-test.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/python-unit-test.yml) [![shellcheck.yml](https://github.com/linux-system-roles/storage/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/shellcheck.yml) [![tft.yml](https://github.com/linux-system-roles/storage/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/storage/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/storage/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/woke.yml) +[![ansible-lint.yml](https://github.com/linux-system-roles/storage/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/storage/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/ansible-test.yml) [![codeql.yml](https://github.com/linux-system-roles/storage/actions/workflows/codeql.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/codeql.yml) [![codespell.yml](https://github.com/linux-system-roles/storage/actions/workflows/codespell.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/codespell.yml) [![markdownlint.yml](https://github.com/linux-system-roles/storage/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/markdownlint.yml) [![python-unit-test.yml](https://github.com/linux-system-roles/storage/actions/workflows/python-unit-test.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/python-unit-test.yml) [![shellcheck.yml](https://github.com/linux-system-roles/storage/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/shellcheck.yml) [![tft.yml](https://github.com/linux-system-roles/storage/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/storage/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/storage/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/storage/actions/workflows/woke.yml) This role allows users to configure local storage with minimal input. diff --git a/contributing.md b/contributing.md index 2b55212b..3cc8e4ba 100644 --- a/contributing.md +++ b/contributing.md @@ -63,7 +63,7 @@ imports are located at `module_utils/storage_lsr`. ### Defaults This is where we define the structure of the vars available to users to specify -how they want the storage to be layed out. There are two top-level lists: +how they want the storage to be laid out. There are two top-level lists: `storage_pools` is a list of pools, which contain volumes, and `storage_volumes`, which are volumes that are not associated with any pool. Examples of pools include LVM volume groups and disks with partition tables. diff --git a/module_utils/storage_lsr/argument_validator.py b/module_utils/storage_lsr/argument_validator.py index 274952ba..04dd3d58 100644 --- a/module_utils/storage_lsr/argument_validator.py +++ b/module_utils/storage_lsr/argument_validator.py @@ -56,7 +56,7 @@ def _validate_bool(cls, value): return False if value is None: return None - raise TypeError("'%s' has to be convertable to a bool" % value) + raise TypeError("'%s' has to be convertible to a bool" % value) @classmethod def _validate_int(cls, value): diff --git a/pylintrc b/pylintrc index 3cd37397..6f82dad5 100644 --- a/pylintrc +++ b/pylintrc @@ -52,7 +52,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