From 64575a96ef2ca41a8363fdfb7def79d4c1b1fafb Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Tue, 23 Jul 2024 10:32:48 +0700 Subject: [PATCH] ci: Enable typos check --- .github/workflows/ci.yml | 9 +++++++++ .typos.toml | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .typos.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 102cf58..390dbde 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,3 +170,12 @@ jobs: # We test documentation using nightly to match docs.rs. This prevents potential breakages - name: cargo doc run: cargo doc --workspace --all-features --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples + + # If this fails, consider changing your text or adding something to .typos.toml + typos: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: check typos + uses: crate-ci/typos@v1.23.2 diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000..894e814 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,21 @@ +# See the configuration reference at +# https://github.com/crate-ci/typos/blob/master/docs/reference.md + +# Corrections take the form of a key/value pair. The key is the incorrect word +# and the value is the correct word. If the key and value are the same, the +# word is treated as always correct. If the value is an empty string, the word +# is treated as always incorrect. + +# Match Identifier - Case Sensitive +[default.extend-identifiers] + +# Match Inside a Word - Case Insensitive +[default.extend-words] + +[files] +# Include .github, .cargo, etc. +ignore-hidden = false +# /.git isn't in .gitignore, because git never tracks it. +# Typos doesn't know that, though. +extend-exclude = ["/.git"] +