Skip to content

Commit 7fb7e86

Browse files
committed
Update spelling check
1 parent 93617ee commit 7fb7e86

5 files changed

Lines changed: 22 additions & 9 deletions

File tree

.github/workflows/typos.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
name: Typos Check
1+
name: Spelling Check
22
on:
33
pull_request:
44
workflow_dispatch:
55

6+
permissions:
7+
contents: read
8+
9+
env:
10+
CLICOLOR: 1
11+
612
jobs:
7-
run:
13+
spelling:
814
name: Spell Check with Typos
915
runs-on: ubuntu-latest
1016
steps:
1117
- name: Checkout Actions Repository
12-
uses: actions/checkout@v4
13-
18+
uses: actions/checkout@main
1419
- name: Check spelling
15-
uses: crate-ci/typos@master
20+
uses: crate-ci/typos@v1.42.1
1621
with:
1722
config: ./typos.toml

src/luau/json.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ mod tests {
313313
fn test_error_cases() {
314314
assert!(parse("").is_err());
315315
assert!(parse("nul").is_err());
316-
assert!(parse("tru").is_err());
317-
assert!(parse("fals").is_err());
316+
assert!(parse("tru").is_err()); // typos:ignore
317+
assert!(parse("fals").is_err()); // typos:ignore
318318
assert!(parse(r#""unterminated"#).is_err());
319319
assert!(parse("[1,2,]").is_err());
320320
assert!(parse(r#"{"key""#).is_err());

src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2150,7 +2150,7 @@ impl Lua {
21502150

21512151
/// Suspends the current async function, returning the provided arguments to caller.
21522152
///
2153-
/// This function is similar to [`coroutine.yield`] but allow yeilding Rust functions
2153+
/// This function is similar to [`coroutine.yield`] but allow yielding Rust functions
21542154
/// and passing values to the caller.
21552155
/// Please note that you cannot cross [`Thread`] boundaries (e.g. calling `yield_with` on one
21562156
/// thread and resuming on another).

tests/luau.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ fn test_loadstring() -> Result<()> {
448448
assert_eq!(f.call::<i32>(())?, 123);
449449

450450
let err = lua
451-
.load(r#"loadstring("retur 123", "chunk")"#)
451+
.load(r#"loadstring("retur 123", "chunk")"#) // typos:ignore
452452
.exec()
453453
.err()
454454
.unwrap();

typos.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
[default]
22
extend-ignore-identifiers-re = ["2nd", "ser"]
3+
extend-ignore-re = [
4+
# Custom ignore regex patterns: https://github.com/crate-ci/typos/blob/master/docs/reference.md#defaultextend-ignore-re
5+
".*(?:#|--|//|/*).*(?:spellchecker|typos):\\s?ignore[^\\n]*\\n",
6+
".*(?:spellchecker|typos):\\s?ignore-next-line[^\\n]*\\n[^\\n]*",
7+
]
8+
9+
[files]
10+
extend-exclude = ["tests/compile/*.stderr"]
311

412
[default.extend-words]
513
thr = "thr"

0 commit comments

Comments
 (0)