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 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()