diff --git a/crates/nu-command/tests/commands/cd.rs b/crates/nu-command/tests/commands/cd.rs index 9165fda99..b27d770d7 100644 --- a/crates/nu-command/tests/commands/cd.rs +++ b/crates/nu-command/tests/commands/cd.rs @@ -76,7 +76,7 @@ fn filesystem_switch_back_to_previous_working_directory() { // FIXME: jt: needs more work #[ignore] #[test] -fn filesytem_change_from_current_directory_using_relative_path_and_dash() { +fn filesystem_change_from_current_directory_using_relative_path_and_dash() { Playground::setup("cd_test_4", |dirs, sandbox| { sandbox.within("odin").mkdir("-"); @@ -292,7 +292,7 @@ fn test_change_windows_drive() { #[cfg(unix)] #[test] -fn cd_permission_deined_folder() { +fn cd_permission_denied_folder() { Playground::setup("cd_test_21", |dirs, sandbox| { sandbox.mkdir("banned"); let actual = nu!( @@ -312,11 +312,11 @@ fn cd_permission_deined_folder() { ); }); } -// FIXME: cd_permission_deined_folder on windows +// FIXME: cd_permission_denied_folder on windows #[ignore] #[cfg(windows)] #[test] -fn cd_permission_deined_folder() { +fn cd_permission_denied_folder() { Playground::setup("cd_test_21", |dirs, sandbox| { sandbox.mkdir("banned"); let actual = nu!( diff --git a/crates/nu-command/tests/commands/try_.rs b/crates/nu-command/tests/commands/try_.rs index 11a1f7250..5e597a789 100644 --- a/crates/nu-command/tests/commands/try_.rs +++ b/crates/nu-command/tests/commands/try_.rs @@ -41,7 +41,7 @@ fn catch_can_access_error_as_dollar_in() { } #[test] -fn external_failed_should_be_catched() { +fn external_failed_should_be_caught() { let output = nu!( cwd: ".", "try { nu --testbin fail; echo 'success' } catch { echo 'fail' }" @@ -66,7 +66,7 @@ fn loop_catch_break_should_show_failed() { cwd: ".", "loop { try { invalid 1; - continue; } catch { echo 'failed'; break } + continue; } catch { echo 'failed'; break } } " ); @@ -80,10 +80,10 @@ fn loop_try_ignores_continue() { cwd: ".", "mut total = 0; for i in 0..10 { - try { if ($i mod 2) == 0 { - continue;} + try { if ($i mod 2) == 0 { + continue;} $total += 1 - } catch { echo 'failed'; break } + } catch { echo 'failed'; break } } echo $total " diff --git a/crates/nu-explore/src/lib.rs b/crates/nu-explore/src/lib.rs index 1d74e3b3b..dd654b30e 100644 --- a/crates/nu-explore/src/lib.rs +++ b/crates/nu-explore/src/lib.rs @@ -115,11 +115,11 @@ pub fn create_commands(registry: &mut CommandRegistry) { registry.register_command_reactive(TweakCmd::default()); } -pub fn create_aliases(regestry: &mut CommandRegistry) { - regestry.create_aliase("h", HelpCmd::NAME); - regestry.create_aliase("e", ExpandCmd::NAME); - regestry.create_aliase("q", QuitCmd::NAME); - regestry.create_aliase("q!", QuitCmd::NAME); +pub fn create_aliases(registry: &mut CommandRegistry) { + registry.create_aliases("h", HelpCmd::NAME); + registry.create_aliases("e", ExpandCmd::NAME); + registry.create_aliases("q", QuitCmd::NAME); + registry.create_aliases("q!", QuitCmd::NAME); } #[rustfmt::skip] diff --git a/crates/nu-explore/src/registry/mod.rs b/crates/nu-explore/src/registry/mod.rs index baa262827..0e8c9bf8c 100644 --- a/crates/nu-explore/src/registry/mod.rs +++ b/crates/nu-explore/src/registry/mod.rs @@ -46,7 +46,7 @@ impl CommandRegistry { ); } - pub fn create_aliase(&mut self, aliases: &str, command: &str) { + pub fn create_aliases(&mut self, aliases: &str, command: &str) { self.aliases.insert( Cow::Owned(aliases.to_owned()), Cow::Owned(command.to_owned()), diff --git a/crates/nu-explore/src/views/preview.rs b/crates/nu-explore/src/views/preview.rs index cf0f76350..eb1530115 100644 --- a/crates/nu-explore/src/views/preview.rs +++ b/crates/nu-explore/src/views/preview.rs @@ -18,7 +18,7 @@ use super::{coloredtextw::ColoredTextW, cursor::XYCursor, Layout, View, ViewConf // todo: Add wrap option #[derive(Debug)] pub struct Preview { - underlaying_value: Option, + underlying_value: Option, lines: Vec, cursor: XYCursor, } @@ -34,12 +34,12 @@ impl Preview { Self { lines, cursor, - underlaying_value: None, + underlying_value: None, } } pub fn set_value(&mut self, value: Value) { - self.underlaying_value = Some(value); + self.underlying_value = Some(value); } } @@ -147,7 +147,7 @@ impl View for Preview { } fn exit(&mut self) -> Option { - match &self.underlaying_value { + match &self.underlying_value { Some(value) => Some(value.clone()), None => { let text = self.lines.join("\n"); diff --git a/crates/nu-parser/tests/test_parser.rs b/crates/nu-parser/tests/test_parser.rs index 3d6d6ea30..ca093d541 100644 --- a/crates/nu-parser/tests/test_parser.rs +++ b/crates/nu-parser/tests/test_parser.rs @@ -1268,7 +1268,7 @@ mod input_types { } } - fn add_declations(engine_state: &mut EngineState) { + fn add_declarations(engine_state: &mut EngineState) { let delta = { let mut working_set = StateWorkingSet::new(engine_state); working_set.add_decl(Box::new(Let)); @@ -1293,7 +1293,7 @@ mod input_types { #[test] fn call_types_test() { let mut engine_state = EngineState::new(); - add_declations(&mut engine_state); + add_declarations(&mut engine_state); let mut working_set = StateWorkingSet::new(&engine_state); let input = r#"ls | to-custom | group-by name other"#; @@ -1356,7 +1356,7 @@ mod input_types { #[test] fn storing_variable_test() { let mut engine_state = EngineState::new(); - add_declations(&mut engine_state); + add_declarations(&mut engine_state); let mut working_set = StateWorkingSet::new(&engine_state); let input = @@ -1388,7 +1388,7 @@ mod input_types { #[test] fn stored_variable_operation_test() { let mut engine_state = EngineState::new(); - add_declations(&mut engine_state); + add_declarations(&mut engine_state); let mut working_set = StateWorkingSet::new(&engine_state); let input = r#"let a = (ls | to-custom | group-by name other); ($a + $a) | agg sum"#; @@ -1419,7 +1419,7 @@ mod input_types { #[test] fn multiple_stored_variable_test() { let mut engine_state = EngineState::new(); - add_declations(&mut engine_state); + add_declarations(&mut engine_state); let mut working_set = StateWorkingSet::new(&engine_state); let input = r#" @@ -1464,7 +1464,7 @@ mod input_types { #[test] fn call_non_custom_types_test() { let mut engine_state = EngineState::new(); - add_declations(&mut engine_state); + add_declarations(&mut engine_state); let mut working_set = StateWorkingSet::new(&engine_state); let input = r#"ls | group-by name"#; @@ -1509,7 +1509,7 @@ mod input_types { #[test] fn nested_operations_test() { let mut engine_state = EngineState::new(); - add_declations(&mut engine_state); + add_declarations(&mut engine_state); let (block, delta) = { let mut working_set = StateWorkingSet::new(&engine_state); @@ -1570,7 +1570,7 @@ mod input_types { #[test] fn call_with_list_test() { let mut engine_state = EngineState::new(); - add_declations(&mut engine_state); + add_declarations(&mut engine_state); let mut working_set = StateWorkingSet::new(&engine_state); let input = r#"[[a b]; [1 2] [3 4]] | to-custom | with-column [ ("a" | min) ("b" | min) ] | collect"#; @@ -1617,7 +1617,7 @@ mod input_types { #[test] fn operations_within_blocks_test() { let mut engine_state = EngineState::new(); - add_declations(&mut engine_state); + add_declarations(&mut engine_state); let mut working_set = StateWorkingSet::new(&engine_state); let inputs = vec![ @@ -1639,7 +1639,7 @@ mod input_types { #[test] fn else_errors_correctly() { let mut engine_state = EngineState::new(); - add_declations(&mut engine_state); + add_declarations(&mut engine_state); let mut working_set = StateWorkingSet::new(&engine_state); let (_, err) = parse( diff --git a/crates/nu-protocol/src/pipeline_data.rs b/crates/nu-protocol/src/pipeline_data.rs index 939c3fb45..e019047e0 100644 --- a/crates/nu-protocol/src/pipeline_data.rs +++ b/crates/nu-protocol/src/pipeline_data.rs @@ -282,7 +282,7 @@ impl PipelineData { } } - /// Retrieves string from pipline data. + /// Retrieves string from pipeline data. /// /// As opposed to `collect_string` this raises error rather than converting non-string values. /// The `span` will be used if `ListStream` is encountered since it doesn't carry a span. diff --git a/crates/nu-table/tests/constrains.rs b/crates/nu-table/tests/constrains.rs index a1a376f32..9e668ac30 100644 --- a/crates/nu-table/tests/constrains.rs +++ b/crates/nu-table/tests/constrains.rs @@ -183,7 +183,7 @@ fn truncate_with_suffix_test() { } #[test] -fn width_controll_test_0() { +fn width_control_test_0() { let data = vec![ vec![_str("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); 16], vec![_str("yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"); 16], diff --git a/crates/nu_plugin_query/src/query_json.rs b/crates/nu_plugin_query/src/query_json.rs index ef28a372b..7de67c0fb 100644 --- a/crates/nu_plugin_query/src/query_json.rs +++ b/crates/nu_plugin_query/src/query_json.rs @@ -61,7 +61,7 @@ fn query_contains_modifiers(query: &str) -> bool { // @pretty: Make the json document more human readable. query.contains("@ugly") || query.contains("@pretty") - // Output as Tablular + // Output as Tabular // Since it's output as tabular, which is our default, we can just ignore these // @reverse: Reverse an array or the members of an object. // @this: Returns the current element. It can be used to retrieve the root element. diff --git a/tests/shell/environment/nu_env.rs b/tests/shell/environment/nu_env.rs index b1e163a4a..ca5e9e2a5 100644 --- a/tests/shell/environment/nu_env.rs +++ b/tests/shell/environment/nu_env.rs @@ -305,7 +305,7 @@ fn given_a_trusted_directory_with_exit_scripts_when_entering_a_subdirectory_exit #[test] #[serial] -fn given_a_hierachy_of_trusted_directories_when_entering_in_any_nested_ones_should_carry_over_variables_set_from_the_root( +fn given_a_hierarchy_of_trusted_directories_when_entering_in_any_nested_ones_should_carry_over_variables_set_from_the_root( ) { Playground::setup("autoenv_test_9", |dirs, sandbox| { sandbox.mkdir("nu_plugin_rb"); @@ -336,7 +336,7 @@ fn given_a_hierachy_of_trusted_directories_when_entering_in_any_nested_ones_shou #[test] #[serial] -fn given_a_hierachy_of_trusted_directories_nested_ones_should_overwrite_variables_from_parent_directories( +fn given_a_hierarchy_of_trusted_directories_nested_ones_should_overwrite_variables_from_parent_directories( ) { Playground::setup("autoenv_test_10", |dirs, sandbox| { sandbox.mkdir("nu_plugin_rb"); @@ -401,7 +401,7 @@ fn local_config_should_not_be_added_when_running_scripts() { } #[test] #[serial] -fn given_a_hierachy_of_trusted_directories_going_back_restores_overwritten_variables() { +fn given_a_hierarchy_of_trusted_directories_going_back_restores_overwritten_variables() { Playground::setup("autoenv_test_11", |dirs, sandbox| { sandbox.mkdir("nu_plugin_rb"); sandbox.with_files(vec![ diff --git a/wix/main.wxs b/wix/main.wxs index e9863af94..61b99d05b 100644 --- a/wix/main.wxs +++ b/wix/main.wxs @@ -413,7 +413,7 @@