From e810995cf8645e07ddc327d34c52920c62fa84ee Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Thu, 4 Apr 2024 09:59:21 +0200 Subject: [PATCH] Bump `crate-ci/typos` and fix typos (#12381) Supersede #12376 --- .github/workflows/typos.yml | 2 +- crates/nu-cmd-dataframe/src/dataframe/lazy/join.rs | 2 +- crates/nu-command/src/platform/input/list.rs | 4 ++-- crates/nu-json/README.md | 4 ++-- crates/nu-protocol/src/errors/shell_error.rs | 2 +- tests/const_/mod.rs | 2 +- typos.toml | 4 +++- 7 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml index 57cb3cbcbc..686da371d0 100644 --- a/.github/workflows/typos.yml +++ b/.github/workflows/typos.yml @@ -10,4 +10,4 @@ jobs: uses: actions/checkout@v4.1.2 - name: Check spelling - uses: crate-ci/typos@v1.19.0 + uses: crate-ci/typos@v1.20.3 diff --git a/crates/nu-cmd-dataframe/src/dataframe/lazy/join.rs b/crates/nu-cmd-dataframe/src/dataframe/lazy/join.rs index 81f9db4b05..7f7d1ab66b 100644 --- a/crates/nu-cmd-dataframe/src/dataframe/lazy/join.rs +++ b/crates/nu-cmd-dataframe/src/dataframe/lazy/join.rs @@ -22,7 +22,7 @@ impl Command for LazyJoin { .required("right_on", SyntaxShape::Any, "Right column(s) to join on") .switch( "inner", - "inner joing between lazyframes (default)", + "inner join between lazyframes (default)", Some('i'), ) .switch("left", "left join between lazyframes", Some('l')) diff --git a/crates/nu-command/src/platform/input/list.rs b/crates/nu-command/src/platform/input/list.rs index 498137bb67..44b21a8da4 100644 --- a/crates/nu-command/src/platform/input/list.rs +++ b/crates/nu-command/src/platform/input/list.rs @@ -128,7 +128,7 @@ impl Command for InputList { // ..Default::default() // }; - let ans: InteractMode = if multi { + let answer: InteractMode = if multi { let multi_select = MultiSelect::new(); //::with_theme(&theme); InteractMode::Multi( @@ -179,7 +179,7 @@ impl Command for InputList { ) }; - Ok(match ans { + Ok(match answer { InteractMode::Multi(res) => { if index { match res { diff --git a/crates/nu-json/README.md b/crates/nu-json/README.md index 8ab5ce0745..acf3c6b296 100644 --- a/crates/nu-json/README.md +++ b/crates/nu-json/README.md @@ -66,7 +66,7 @@ fn main() { println!("first: {}", array.first().unwrap()); // Add a value - array.push(Value::String("tak".to_string())); + array.push(Value::String("baz".to_string())); } // Encode to Hjson @@ -76,4 +76,4 @@ fn main() { ``` # DOCS -At the moment, the documentation on [serde_hjson](https://docs.rs/serde-hjson/0.9.1/serde_hjson/) / [serde_json](https://docs.rs/serde_json/1.0.93/serde_json/) is also relevant for nu-json. \ No newline at end of file +At the moment, the documentation on [serde_hjson](https://docs.rs/serde-hjson/0.9.1/serde_hjson/) / [serde_json](https://docs.rs/serde_json/1.0.93/serde_json/) is also relevant for nu-json. diff --git a/crates/nu-protocol/src/errors/shell_error.rs b/crates/nu-protocol/src/errors/shell_error.rs index 1d8a2ef872..a97f36951c 100644 --- a/crates/nu-protocol/src/errors/shell_error.rs +++ b/crates/nu-protocol/src/errors/shell_error.rs @@ -473,7 +473,7 @@ pub enum ShellError { span: Span, }, - /// An error happened while tryin to create a range. + /// An error happened while trying to create a range. /// /// This can happen in various unexpected situations, for example if the range would loop forever (as would be the case with a 0-increment). /// diff --git a/tests/const_/mod.rs b/tests/const_/mod.rs index 2f03bcdc67..603eaba66c 100644 --- a/tests/const_/mod.rs +++ b/tests/const_/mod.rs @@ -335,7 +335,7 @@ fn const_captures_in_closures_work() { assert_eq!(actual.out, "hello world"); } -#[ignore = "TODO: Need to fix `overlay hide` to hide the constants brough by `overlay use`"] +#[ignore = "TODO: Need to fix `overlay hide` to hide the constants brought by `overlay use`"] #[test] fn complex_const_overlay_use_hide() { let inp = &[MODULE_SETUP, "overlay use spam", "$X"]; diff --git a/typos.toml b/typos.toml index 6d842018b9..a8c81542e9 100644 --- a/typos.toml +++ b/typos.toml @@ -1,10 +1,12 @@ [files] -extend-exclude = ["crates/nu-command/tests/commands/table.rs", "*.tsv", "*.json", "*.txt"] +extend-exclude = ["crates/nu-command/tests/commands/table.rs", "*.tsv", "*.json", "*.txt", "tests/fixtures/formats/*"] [default.extend-words] # Ignore false-positives nd = "nd" +pn = "pn" fo = "fo" +ful = "ful" ons = "ons" ba = "ba" Plasticos = "Plasticos"