From 8fc61a27f8040c7282d64f5e701b008b662e0f21 Mon Sep 17 00:00:00 2001 From: Miles <2627273987@qq.com> Date: Mon, 4 Mar 2024 17:17:49 +0800 Subject: [PATCH 1/2] fix typo --- integration/tests/batch_tests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/tests/batch_tests.rs b/integration/tests/batch_tests.rs index 7430e7faf..900279ccc 100644 --- a/integration/tests/batch_tests.rs +++ b/integration/tests/batch_tests.rs @@ -59,7 +59,7 @@ fn load_chunk_hashes_and_proofs( .zip(chunk_proofs[..].iter().cloned()) .collect(); - // Dump chunk-procotol for further batch-proving. + // Dump chunk-protocol for further batch-proving. chunk_hashes_proofs .first() .unwrap() From e8526a2ea564f43f8443f14daf823adbc87d2342 Mon Sep 17 00:00:00 2001 From: Miles <2627273987@qq.com> Date: Wed, 13 Mar 2024 23:22:25 +0800 Subject: [PATCH 2/2] Add codespell check to workflow --- .codespell/.codespellrc | 5 +++++ .codespell/requirements.txt | 1 + .codespell/wordlist.txt | 1 + .github/workflows/codespell.yml | 30 ++++++++++++++++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 .codespell/.codespellrc create mode 100644 .codespell/requirements.txt create mode 100644 .codespell/wordlist.txt create mode 100644 .github/workflows/codespell.yml diff --git a/.codespell/.codespellrc b/.codespell/.codespellrc new file mode 100644 index 000000000..b5065253a --- /dev/null +++ b/.codespell/.codespellrc @@ -0,0 +1,5 @@ +[codespell] +skip = .git,node_modules,yarn.lock,Cargo.lock +count = +quiet-level = 3 +ignore-words = ./.codespell/wordlist.txt \ No newline at end of file diff --git a/.codespell/requirements.txt b/.codespell/requirements.txt new file mode 100644 index 000000000..571daf3b9 --- /dev/null +++ b/.codespell/requirements.txt @@ -0,0 +1 @@ +codespell==2.2.5 \ No newline at end of file diff --git a/.codespell/wordlist.txt b/.codespell/wordlist.txt new file mode 100644 index 000000000..1a22196e0 --- /dev/null +++ b/.codespell/wordlist.txt @@ -0,0 +1 @@ +crate \ No newline at end of file diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 000000000..04727ffef --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,30 @@ +# A Github action that using codespell to check spell. +# .codespell/.codespellrc is a config file. +# .codespell/wordlist.txt is a list of words that will ignore word checks. +# More details please check the following link: +# https://github.com/codespell-project/codespell + +name: Codespell + +on: pull_request + +jobs: + codespell: + runs-on: ubuntu-latest + + steps: + - name: Checkout the repository + 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 -r ./.codespell/requirements.txt + + - name: Spell check + run: codespell --config=./.codespell/.codespellrc \ No newline at end of file