From 512917e0c3be29363be065136d54ae348d663e96 Mon Sep 17 00:00:00 2001 From: Doonv <58695417+doonv@users.noreply.github.com> Date: Wed, 28 Feb 2024 19:20:41 +0200 Subject: [PATCH] Add `typos` spell checker to CI (#20) # Objective Prevent typos. ## Solution Add the `typos` spell checker to CI. --- .github/workflows/ci.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edb6fca..1fd6b9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,4 +55,20 @@ jobs: - name: Run cargo clippy # TODO: Mark warnings as errors once all warnings are gone # run: cargo clippy -- -D warnings - run: cargo clippy \ No newline at end of file + run: cargo clippy + + typos: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - name: Check for typos + uses: crate-ci/typos@v1.18.2 + - name: Typos info + if: failure() + run: | + echo 'To fix typos, please run `typos -w`' + echo 'To check for a diff, run `typos`' + echo 'You can find typos here: https://crates.io/crates/typos' + echo 'if you use VSCode, you can also install `Typos Spell Checker' + echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode'