From 76a08bf2d9a4b5b15a7e3b1f2c881d3b91cbb400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Mon, 16 Oct 2023 23:48:41 +0200 Subject: [PATCH 1/7] Update spelling.yml --- .github/workflows/spelling.yml | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index d7c1a73..4d29a05 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -28,23 +28,17 @@ jobs: - name: "Checkout repository" uses: "actions/checkout@v3.6.0" + - + name: "Cache pip" + uses: "actions/cache@v3" + with: + path: "~/.cache/pip" + key: "${{ runner.os }}-pip-codespell" + - + name: "Install codespell" + run: | + pip install --user 'codespell>=2.2' - name: "Search for misspellings" - #uses: "crate-ci/typos@v1.16.4" - env: - GH_TOKEN: "${{ github.token }}" - # yamllint disable rule:line-length run: | - set -o pipefail - mkdir -p "${{ runner.temp }}/typos" - RELEASE_ASSET_URL="$( - gh api /repos/crate-ci/typos/releases/latest \ - --jq '."assets"[] | select(."name" | test("^typos-.+-x86_64-unknown-linux-musl\\.tar\\.gz$")) | ."browser_download_url"' - )" - wget --secure-protocol=TLSv1_3 --max-redirect=1 --retry-on-host-error --retry-connrefused --tries=3 \ - --quiet --output-document=- "${RELEASE_ASSET_URL}" \ - | tar -xz -C "${{ runner.temp }}/typos" ./typos - "${{ runner.temp }}/typos/typos" --version - git grep --files-with-matches --null -I -e '.' \ - | xargs -0 -t -- "${{ runner.temp }}/typos/typos" --format json \ - | jq --raw-output '"::warning file=\(.path),line=\(.line_num),col=\(.byte_offset)::\"\(.typo)\" should be \"" + (.corrections // [] | join("\" or \"") + "\".")' + python -m codespell_lib From 411450db46d4bbe13c88672a94bd6e0c77d29f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 17 Oct 2023 09:23:22 +0200 Subject: [PATCH 2/7] Update spelling.yml --- .github/workflows/spelling.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index 4d29a05..8c03a3f 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -41,4 +41,9 @@ jobs: - name: "Search for misspellings" run: | - python -m codespell_lib + "$(python -m site --user-base)/bin/codespell" \ + --skip=./.git \ + --check-hidden \ + --check-filenames \ + --builtin=clear,rare,informal,usage,code,names \ + --ignore-words-list=master From 398952f8c1aa738bc77eae7b639ba6898e06bbb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 17 Oct 2023 18:56:35 +0200 Subject: [PATCH 3/7] Update spelling.yml --- .github/workflows/spelling.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index 8c03a3f..6a5a4eb 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -46,4 +46,5 @@ jobs: --check-hidden \ --check-filenames \ --builtin=clear,rare,informal,usage,code,names \ + --skip=package-lock.json \ --ignore-words-list=master From 5e94988c4fc76345866df8df48c1cc83a71088d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Tue, 17 Oct 2023 18:59:52 +0200 Subject: [PATCH 4/7] Update spelling.yml --- .github/workflows/spelling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index 6a5a4eb..c6b032d 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -47,4 +47,4 @@ jobs: --check-filenames \ --builtin=clear,rare,informal,usage,code,names \ --skip=package-lock.json \ - --ignore-words-list=master + --ignore-words-list=master From 755cd8de99e623d9a3106b45a268270e473f29e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 18 Oct 2023 06:27:29 +0200 Subject: [PATCH 5/7] Update spelling.yml --- .github/workflows/spelling.yml | 44 +++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index c6b032d..dabe02e 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -21,30 +21,36 @@ concurrency: jobs: typos_check: - name: "文A Typos" + name: "文A codespell" runs-on: "ubuntu-22.04" timeout-minutes: 1 steps: - name: "Checkout repository" uses: "actions/checkout@v3.6.0" - - - name: "Cache pip" - uses: "actions/cache@v3" - with: - path: "~/.cache/pip" - key: "${{ runner.os }}-pip-codespell" - - - name: "Install codespell" - run: | - pip install --user 'codespell>=2.2' + #- + # name: "Cache pip" + # uses: "actions/cache@v3" + # with: + # path: "~/.cache/pip" + # key: "${{ runner.os }}-pip-codespell" + #- + # name: "Install codespell" + # run: | + # pip install --user 'codespell>=2.2' - name: "Search for misspellings" - run: | - "$(python -m site --user-base)/bin/codespell" \ - --skip=./.git \ - --check-hidden \ - --check-filenames \ - --builtin=clear,rare,informal,usage,code,names \ - --skip=package-lock.json \ - --ignore-words-list=master + uses: "codespell-project/actions-codespell@v2.0" + with: + skip: "./.git,package-lock.json" + check_hidden: true + check_filenames: true + builtin: "clear,rare,informal,usage,code,names" + ignore_words_list: "master" + #run: | + # "$(python -m site --user-base)/bin/codespell" \ + # --skip="./.git,package-lock.json" \ + # --check-hidden \ + # --check-filenames \ + # --builtin="clear,rare,informal,usage,code,names" \ + # --ignore-words-list="master" From 6bc580940dc0c0fbdc9cee74a67ba9b11c066bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 18 Oct 2023 06:29:43 +0200 Subject: [PATCH 6/7] Update spelling.yml --- .github/workflows/spelling.yml | 48 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index dabe02e..0863078 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -28,29 +28,29 @@ jobs: - name: "Checkout repository" uses: "actions/checkout@v3.6.0" - #- - # name: "Cache pip" - # uses: "actions/cache@v3" - # with: - # path: "~/.cache/pip" - # key: "${{ runner.os }}-pip-codespell" - #- - # name: "Install codespell" - # run: | - # pip install --user 'codespell>=2.2' - - name: "Search for misspellings" - uses: "codespell-project/actions-codespell@v2.0" + name: "Cache pip" + uses: "actions/cache@v3" with: - skip: "./.git,package-lock.json" - check_hidden: true - check_filenames: true - builtin: "clear,rare,informal,usage,code,names" - ignore_words_list: "master" - #run: | - # "$(python -m site --user-base)/bin/codespell" \ - # --skip="./.git,package-lock.json" \ - # --check-hidden \ - # --check-filenames \ - # --builtin="clear,rare,informal,usage,code,names" \ - # --ignore-words-list="master" + path: "~/.cache/pip" + key: "${{ runner.os }}-pip-codespell" + - + name: "Install codespell" + run: | + pip install --user 'codespell>=2.2' + - + name: "Search for misspellings" + #uses: "codespell-project/actions-codespell@v2.0" + #with: + # skip: "./.git,package-lock.json" + # check_hidden: true + # check_filenames: true + # builtin: "clear,rare,informal,usage,code,names" + # ignore_words_list: "master" + run: | + "$(python -m site --user-base)/bin/codespell" \ + --skip="./.git,package-lock.json" \ + --check-hidden \ + --check-filenames \ + --builtin="clear,rare,informal,usage,code,names" \ + --ignore-words-list="master" From e15e44782079f8101e743c045472ae70f05aa7fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 18 Oct 2023 06:42:05 +0200 Subject: [PATCH 7/7] Update spelling.yml --- .github/workflows/spelling.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index 0863078..1112fe9 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -20,7 +20,7 @@ concurrency: cancel-in-progress: true jobs: - typos_check: + codespell_check: name: "文A codespell" runs-on: "ubuntu-22.04" timeout-minutes: 1