From 8d32d88e6436431b0c5c69757a1b46b5bd2035da Mon Sep 17 00:00:00 2001 From: zihang Date: Wed, 23 Oct 2024 14:14:49 +0800 Subject: [PATCH] ci: typo ignore --- .github/workflows/check.yml | 18 ------------------ .github/workflows/typo.yml | 18 ++++++++++++++++++ moonbit-docs/docs/examples/sudoku/index.md | 2 +- typos.toml | 5 +++++ 4 files changed, 24 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/typo.yml create mode 100644 typos.toml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 9fc61b13..4131d939 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -99,21 +99,3 @@ jobs: run: | Get-ChildItem -Path ".\target" -Recurse -Filter "*.wasm" | ForEach-Object { "{0} ({1} bytes)" -f $_.FullName, $_.Length } Get-ChildItem -Path ".\target" -Recurse -Filter "*.js" | ForEach-Object { "{0} ({1} bytes)" -f $_.FullName, $_.Length } - - typo-check: - runs-on: ubuntu-latest - timeout-minutes: 10 - env: - FORCE_COLOR: 1 - TYPOS_VERSION: v1.19.0 - steps: - - name: download typos - run: curl -LsSf https://github.com/crate-ci/typos/releases/download/$TYPOS_VERSION/typos-$TYPOS_VERSION-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin - - - name: Checkout repository - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: check typos - run: typos diff --git a/.github/workflows/typo.yml b/.github/workflows/typo.yml new file mode 100644 index 00000000..3ef1ba26 --- /dev/null +++ b/.github/workflows/typo.yml @@ -0,0 +1,18 @@ +name: check examples + +on: + push: + branches: + - main + pull_request: + +jobs: + typo-check: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: check typos + uses: crate-ci/typos@v1.26.0 + \ No newline at end of file diff --git a/moonbit-docs/docs/examples/sudoku/index.md b/moonbit-docs/docs/examples/sudoku/index.md index 9ae06f0a..3b5bf7d9 100644 --- a/moonbit-docs/docs/examples/sudoku/index.md +++ b/moonbit-docs/docs/examples/sudoku/index.md @@ -391,6 +391,6 @@ The purpose of games is to relieve boredom and bring joy. If playing a game beco Let's play with MoonBit with ease! -Visit MoonBit [Gallery](https://www.moonbitlang.com/gallery/sudoku/) to play with the Sudoku solver writen in MoonBit. Click [this link](https://github.com/myfreess/sudoku) to view the full source code. +Visit MoonBit [Gallery](https://www.moonbitlang.com/gallery/sudoku/) to play with the Sudoku solver written in MoonBit. Click [this link](https://github.com/myfreess/sudoku) to view the full source code. This tutorial references Norvig's blog: [http://norvig.com/sudoku.html](http://norvig.com/sudoku.html) diff --git a/typos.toml b/typos.toml new file mode 100644 index 00000000..642f2653 --- /dev/null +++ b/typos.toml @@ -0,0 +1,5 @@ +[files] +extend-exclude = ["*.excalidraw"] + +[default] +extend-ignore-words-re = ["CAF", "ND"] \ No newline at end of file