From 631ad0b0177057796772ae7dad4222c8db7b151a Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sun, 13 Oct 2024 12:56:24 +0200 Subject: [PATCH 01/12] chore: test spellcheck ci --- .github/workflows/spell-check.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/spell-check.yml diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml new file mode 100644 index 0000000000..31c24a166f --- /dev/null +++ b/.github/workflows/spell-check.yml @@ -0,0 +1,18 @@ +name: Spellcheck + +on: [workflow_dispatch, push, pull_request] + +jobs: + build: + name: Spellcheck + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install prerequisites + run: sudo pip install codespell==2.0.0 + + - name: Spell check + run: codespell From 7e12bc608b5ac287c9a76302b3fe5e5a90d7127e Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sun, 13 Oct 2024 13:02:04 +0200 Subject: [PATCH 02/12] chore: debugging --- .codespell/.codespellrc | 4 ++++ .codespell/requirements.txt | 1 + .codespell/wordlist.txt | 1 + .github/workflows/spell-check.yml | 17 +++++++++++++---- 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 .codespell/.codespellrc create mode 100644 .codespell/requirements.txt create mode 100644 .codespell/wordlist.txt diff --git a/.codespell/.codespellrc b/.codespell/.codespellrc new file mode 100644 index 0000000000..691d60c354 --- /dev/null +++ b/.codespell/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +quiet-level = 2 +count = +ignore-words = ./.codespell/wordlist.txt diff --git a/.codespell/requirements.txt b/.codespell/requirements.txt new file mode 100644 index 0000000000..ddff454685 --- /dev/null +++ b/.codespell/requirements.txt @@ -0,0 +1 @@ +codespell==2.2.5 diff --git a/.codespell/wordlist.txt b/.codespell/wordlist.txt new file mode 100644 index 0000000000..a257da0e2d --- /dev/null +++ b/.codespell/wordlist.txt @@ -0,0 +1 @@ +Flarum diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 31c24a166f..838a27f59a 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -1,6 +1,8 @@ name: Spellcheck -on: [workflow_dispatch, push, pull_request] +on: + push: + pull_request: jobs: build: @@ -9,10 +11,17 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + - name: pip cache + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: ${{ runner.os }}-pip- - name: Install prerequisites - run: sudo pip install codespell==2.0.0 + run: sudo pip install -r ./.codespell/requirements.txt - name: Spell check - run: codespell + run: codespell --config=./.codespell/.codespellrc From 3612cda946c4010195a54278c9d5b48aea0083a9 Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sun, 13 Oct 2024 13:09:06 +0200 Subject: [PATCH 03/12] chore: debugging --- .codespell/.codespellrc | 4 ---- .codespell/requirements.txt | 1 - .codespell/wordlist.txt | 1 - .github/workflows/spell-check.yml | 33 ++++++++++--------------------- 4 files changed, 10 insertions(+), 29 deletions(-) delete mode 100644 .codespell/.codespellrc delete mode 100644 .codespell/requirements.txt delete mode 100644 .codespell/wordlist.txt diff --git a/.codespell/.codespellrc b/.codespell/.codespellrc deleted file mode 100644 index 691d60c354..0000000000 --- a/.codespell/.codespellrc +++ /dev/null @@ -1,4 +0,0 @@ -[codespell] -quiet-level = 2 -count = -ignore-words = ./.codespell/wordlist.txt diff --git a/.codespell/requirements.txt b/.codespell/requirements.txt deleted file mode 100644 index ddff454685..0000000000 --- a/.codespell/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -codespell==2.2.5 diff --git a/.codespell/wordlist.txt b/.codespell/wordlist.txt deleted file mode 100644 index a257da0e2d..0000000000 --- a/.codespell/wordlist.txt +++ /dev/null @@ -1 +0,0 @@ -Flarum diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 838a27f59a..542efdf2a2 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -1,27 +1,14 @@ -name: Spellcheck - -on: - push: - pull_request: - +name: Codespell +on: [push, pull_request] +permissions: {} jobs: - build: - name: Spellcheck + codespell: + name: Check for spelling errors runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: pip cache - uses: actions/cache@v4 + - uses: actions/checkout@v4 with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: ${{ runner.os }}-pip- - - - name: Install prerequisites - run: sudo pip install -r ./.codespell/requirements.txt - - - name: Spell check - run: codespell --config=./.codespell/.codespellrc + persist-credentials: false + - uses: codespell-project/actions-codespell@master + with: + check_filenames: true From 3686dbe7d83d7d5f1203408c8965cabcaa93ecfc Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sun, 13 Oct 2024 13:15:00 +0200 Subject: [PATCH 04/12] chore: skip dist --- .github/workflows/spell-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 542efdf2a2..0ef9358af8 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -12,3 +12,4 @@ jobs: - uses: codespell-project/actions-codespell@master with: check_filenames: true + skip: "dist/*,dist-typings/*" From 8b39e5e6944f0605d6619208d731643b94803253 Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sun, 13 Oct 2024 13:17:54 +0200 Subject: [PATCH 05/12] chore --- .github/workflows/spell-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 0ef9358af8..5bb2c87e12 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -12,4 +12,4 @@ jobs: - uses: codespell-project/actions-codespell@master with: check_filenames: true - skip: "dist/*,dist-typings/*" + args: "--skip dist,dist-typings" From 97a1207a644b574413f20bda206cc3db5e2f409e Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sun, 13 Oct 2024 13:21:06 +0200 Subject: [PATCH 06/12] test --- .codespellignore | 3 +++ .github/workflows/spell-check.yml | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .codespellignore diff --git a/.codespellignore b/.codespellignore new file mode 100644 index 0000000000..ce1492f0cc --- /dev/null +++ b/.codespellignore @@ -0,0 +1,3 @@ +dist/ +dist-typings/ +yarn.lock diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 5bb2c87e12..542efdf2a2 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -12,4 +12,3 @@ jobs: - uses: codespell-project/actions-codespell@master with: check_filenames: true - args: "--skip dist,dist-typings" From 9148fd1fba2b0d0ecb2a906bdcaa7b34ac71cc11 Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sun, 13 Oct 2024 13:23:20 +0200 Subject: [PATCH 07/12] maybe --- .github/workflows/spell-check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 542efdf2a2..099cd40c65 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -12,3 +12,4 @@ jobs: - uses: codespell-project/actions-codespell@master with: check_filenames: true + args: "--ignore-file .codespellignore" From 32e211c4beb26194c7aee57d5835263096240714 Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sun, 13 Oct 2024 13:29:27 +0200 Subject: [PATCH 08/12] please --- .github/workflows/spell-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 099cd40c65..e08e792863 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -12,4 +12,4 @@ jobs: - uses: codespell-project/actions-codespell@master with: check_filenames: true - args: "--ignore-file .codespellignore" + args: "--skip="*/dist/*,*/dist-typings/*,yarn.lock" From 8020b0b2cee47040b12d3a940a12c2eefe240d2a Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sun, 13 Oct 2024 13:31:38 +0200 Subject: [PATCH 09/12] step back --- .github/workflows/spell-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index e08e792863..434bbe0b16 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -12,4 +12,4 @@ jobs: - uses: codespell-project/actions-codespell@master with: check_filenames: true - args: "--skip="*/dist/*,*/dist-typings/*,yarn.lock" + args: "--skip="yarn.lock" From feb6d2135cbfb4956017e2e2605ee22c31bb7dd5 Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sun, 13 Oct 2024 13:32:52 +0200 Subject: [PATCH 10/12] see --- .codespellignore | 3 --- .github/workflows/spell-check.yml | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 .codespellignore diff --git a/.codespellignore b/.codespellignore deleted file mode 100644 index ce1492f0cc..0000000000 --- a/.codespellignore +++ /dev/null @@ -1,3 +0,0 @@ -dist/ -dist-typings/ -yarn.lock diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 434bbe0b16..4c4301fbb0 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -6,7 +6,7 @@ jobs: name: Check for spelling errors runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 with: persist-credentials: false - uses: codespell-project/actions-codespell@master From bed9fd65bd45b42ce988eaf4de444680e09c3d92 Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sun, 13 Oct 2024 13:35:50 +0200 Subject: [PATCH 11/12] regression --- .github/workflows/spell-check.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 4c4301fbb0..523ed2e236 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -11,5 +11,4 @@ jobs: persist-credentials: false - uses: codespell-project/actions-codespell@master with: - check_filenames: true - args: "--skip="yarn.lock" + skip: yarn.lock From 4f1cef781443df676a5064d24281ca452774b368 Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sun, 13 Oct 2024 13:41:51 +0200 Subject: [PATCH 12/12] maybe --- .github/workflows/spell-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 523ed2e236..0d843159a0 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -11,4 +11,4 @@ jobs: persist-credentials: false - uses: codespell-project/actions-codespell@master with: - skip: yarn.lock + skip: yarn.lock,./extensions/*/js/dist/*.js,./extensions/*/js/dist/*.js.map,./framework/core/js/dist/*.js.map,./framework/core/js/dist/*.js