mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
Update spelling check
This commit is contained in:
@@ -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
@@ -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
@@ -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
@@ -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();
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user