Update spelling check

This commit is contained in:
Alex Orlenko
2026-01-23 15:37:18 +00:00
parent 93617eef4e
commit 7fb7e8685f
5 changed files with 22 additions and 9 deletions
+10 -5
View File
@@ -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
+2 -2
View File
@@ -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());
+1 -1
View File
@@ -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).
+1 -1
View File
@@ -448,7 +448,7 @@ fn test_loadstring() -> Result<()> {
assert_eq!(f.call::<i32>(())?, 123);
let err = lua
.load(r#"loadstring("retur 123", "chunk")"#)
.load(r#"loadstring("retur 123", "chunk")"#) // typos:ignore
.exec()
.err()
.unwrap();
+8
View File
@@ -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"