From 7fb7e8685f45135679bcab31f82ee404ea009968 Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Fri, 23 Jan 2026 15:37:18 +0000 Subject: [PATCH] Update spelling check --- .github/workflows/typos.yml | 15 ++++++++++----- src/luau/json.rs | 4 ++-- src/state.rs | 2 +- tests/luau.rs | 2 +- typos.toml | 8 ++++++++ 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml index c904d66..1cd3c1c 100644 --- a/.github/workflows/typos.yml +++ b/.github/workflows/typos.yml @@ -1,17 +1,22 @@ -name: Typos Check +name: Spelling Check on: pull_request: workflow_dispatch: +permissions: + contents: read + +env: + CLICOLOR: 1 + jobs: - run: + spelling: name: Spell Check with Typos runs-on: ubuntu-latest steps: - name: Checkout Actions Repository - uses: actions/checkout@v4 - + uses: actions/checkout@main - name: Check spelling - uses: crate-ci/typos@master + uses: crate-ci/typos@v1.42.1 with: config: ./typos.toml diff --git a/src/luau/json.rs b/src/luau/json.rs index 06b7160..ce17a20 100644 --- a/src/luau/json.rs +++ b/src/luau/json.rs @@ -313,8 +313,8 @@ mod tests { fn test_error_cases() { assert!(parse("").is_err()); assert!(parse("nul").is_err()); - assert!(parse("tru").is_err()); - assert!(parse("fals").is_err()); + assert!(parse("tru").is_err()); // typos:ignore + assert!(parse("fals").is_err()); // typos:ignore assert!(parse(r#""unterminated"#).is_err()); assert!(parse("[1,2,]").is_err()); assert!(parse(r#"{"key""#).is_err()); diff --git a/src/state.rs b/src/state.rs index 0808ad2..77ee199 100644 --- a/src/state.rs +++ b/src/state.rs @@ -2150,7 +2150,7 @@ impl Lua { /// Suspends the current async function, returning the provided arguments to caller. /// - /// This function is similar to [`coroutine.yield`] but allow yeilding Rust functions + /// This function is similar to [`coroutine.yield`] but allow yielding Rust functions /// and passing values to the caller. /// Please note that you cannot cross [`Thread`] boundaries (e.g. calling `yield_with` on one /// thread and resuming on another). diff --git a/tests/luau.rs b/tests/luau.rs index 07495f9..2b59785 100644 --- a/tests/luau.rs +++ b/tests/luau.rs @@ -448,7 +448,7 @@ fn test_loadstring() -> Result<()> { assert_eq!(f.call::(())?, 123); let err = lua - .load(r#"loadstring("retur 123", "chunk")"#) + .load(r#"loadstring("retur 123", "chunk")"#) // typos:ignore .exec() .err() .unwrap(); diff --git a/typos.toml b/typos.toml index ef76864..7a8fc52 100644 --- a/typos.toml +++ b/typos.toml @@ -1,5 +1,13 @@ [default] extend-ignore-identifiers-re = ["2nd", "ser"] +extend-ignore-re = [ + # Custom ignore regex patterns: https://github.com/crate-ci/typos/blob/master/docs/reference.md#defaultextend-ignore-re + ".*(?:#|--|//|/*).*(?:spellchecker|typos):\\s?ignore[^\\n]*\\n", + ".*(?:spellchecker|typos):\\s?ignore-next-line[^\\n]*\\n[^\\n]*", +] + +[files] +extend-exclude = ["tests/compile/*.stderr"] [default.extend-words] thr = "thr"