From 930a4cb3d60decfc7bf5a708c9fbe96fa1219ab6 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 12 Aug 2024 07:45:03 +0700 Subject: [PATCH] ci: Add typos check --- .github/workflows/rust.yml | 8 ++++++++ .typos.toml | 23 +++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .typos.toml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 61a8e862..bb176454 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -46,12 +46,20 @@ jobs: run: cargo build --verbose - name: Run tests run: cargo test --verbose + typos: + # If this fails, consider changing your text or adding something to .typos.toml + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: check typos + uses: crate-ci/typos@v1.23.6 build_result: name: Result runs-on: ubuntu-latest needs: - "build" - "semver" + - "typos" steps: - name: Mark the job as successful run: exit 0 diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 00000000..0e7b59eb --- /dev/null +++ b/.typos.toml @@ -0,0 +1,23 @@ +# 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] +setShowsApplicatinBadge_ = "setShowsApplicatinBadge_" +showsApplicatinBadge = "showsApplicatinBadge" + +# 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"] +