From 0bc36ed9f19b2bcaaecff1d7fac987df3fd08bfb Mon Sep 17 00:00:00 2001 From: Sergei Petrosian Date: Wed, 12 Feb 2025 12:54:32 +0100 Subject: [PATCH 1/3] 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 f3af1b5f..fc1a2542 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Microsoft SQL Server -[![ansible-lint.yml](https://github.com/linux-system-roles/mssql/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/mssql/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/mssql/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/mssql/actions/workflows/ansible-test.yml) [![markdownlint.yml](https://github.com/linux-system-roles/mssql/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/mssql/actions/workflows/markdownlint.yml) [![tft.yml](https://github.com/linux-system-roles/mssql/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/mssql/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/mssql/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/mssql/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/mssql/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/mssql/actions/workflows/woke.yml) +[![ansible-lint.yml](https://github.com/linux-system-roles/mssql/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/linux-system-roles/mssql/actions/workflows/ansible-lint.yml) [![ansible-test.yml](https://github.com/linux-system-roles/mssql/actions/workflows/ansible-test.yml/badge.svg)](https://github.com/linux-system-roles/mssql/actions/workflows/ansible-test.yml) [![codespell.yml](https://github.com/linux-system-roles/mssql/actions/workflows/codespell.yml/badge.svg)](https://github.com/linux-system-roles/mssql/actions/workflows/codespell.yml) [![markdownlint.yml](https://github.com/linux-system-roles/mssql/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/linux-system-roles/mssql/actions/workflows/markdownlint.yml) [![tft.yml](https://github.com/linux-system-roles/mssql/actions/workflows/tft.yml/badge.svg)](https://github.com/linux-system-roles/mssql/actions/workflows/tft.yml) [![tft_citest_bad.yml](https://github.com/linux-system-roles/mssql/actions/workflows/tft_citest_bad.yml/badge.svg)](https://github.com/linux-system-roles/mssql/actions/workflows/tft_citest_bad.yml) [![woke.yml](https://github.com/linux-system-roles/mssql/actions/workflows/woke.yml/badge.svg)](https://github.com/linux-system-roles/mssql/actions/workflows/woke.yml) This role installs, configures, and starts Microsoft SQL Server. From 18f28d93be416742845bcd2416f94a44d26cb909 Mon Sep 17 00:00:00 2001 From: Sergei Petrosian Date: Wed, 12 Feb 2025 13:06:56 +0100 Subject: [PATCH 2/3] chore: Fix spelling --- CHANGELOG.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e77e2e2..96197414 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -633,7 +633,7 @@ Changelog - Add workarounds for known issues in SQL Server 2022 - Use delay=3 timeout=40 in wait_for module to avoid unreachable server -- Imrpove performance by intputting multiple SQL files with loop internaly (#116) +- Improve performance by intputting multiple SQL files with loop internally (#116) - Make it possible to input multiple file with loop internally - Rename task file and vars for clarity - Make regex for files extension search more strict diff --git a/README.md b/README.md index fc1a2542..37004286 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ The role uses `sqlcmd` for the following tasks: By default, installs and uses the latest version 18. You can set this variable to `[17, 18]` to install two versions in parallel. -In the case when this variable contains multiple elements, the role instals both but uses latest provided version. +In the case when this variable contains multiple elements, the role installs both but uses latest provided version. The role does not remove mssql-tools packages if you unset a version with this variable. From 691c815a02a3e66f12cb64c57bcffdce2331da86 Mon Sep 17 00:00:00 2001 From: Sergei Petrosian Date: Thu, 13 Feb 2025 11:02:33 +0100 Subject: [PATCH 3/3] Ignore .pandoc_template.html5 --- .codespellrc | 2 +- .pandoc_template.html5 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.codespellrc b/.codespellrc index 2bf9755e..8f96f52a 100644 --- a/.codespellrc +++ b/.codespellrc @@ -5,4 +5,4 @@ check-hidden = true 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 +skip = .pandoc_template.html5,.README.html diff --git a/.pandoc_template.html5 b/.pandoc_template.html5 index 1be9b788..f2146610 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 software: +portions of the following third party softwares: (1) "GitHub Markdown CSS", Copyright (c) Sindre Sorhus, MIT License (MIT). (2) "Primer CSS", Copyright (c) 2016 GitHub Inc., MIT License (MIT).