mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 20:17:44 +02:00
Add Github Actions workflow to check for typos (#7892)
- Add Github Actions workflow to check typos - Fix existing typos
This commit is contained in:
@ -70,8 +70,8 @@ fn parse_range(range: Value, head: Span) -> Result<(isize, isize, Span), ShellEr
|
||||
}
|
||||
}
|
||||
Value::String { val, span } => {
|
||||
let splitted_result = val.split_once(',');
|
||||
match splitted_result {
|
||||
let split_result = val.split_once(',');
|
||||
match split_result {
|
||||
Some((start, end)) => (start.to_string(), end.to_string(), span),
|
||||
None => {
|
||||
return Err(ShellError::UnsupportedInput(
|
||||
|
@ -21,7 +21,7 @@ impl Command for SplitBy {
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"Create a new table splitted."
|
||||
"Create a new table split."
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -190,7 +190,7 @@ impl UrlComponents {
|
||||
|
||||
if let Some(q) = self.query {
|
||||
if q != qs {
|
||||
// if query is present it means that also query_span is setted.
|
||||
// if query is present it means that also query_span is set.
|
||||
return Err(ShellError::IncompatibleParameters {
|
||||
left_message: format!("Mismatch, qs from params is: {}", qs),
|
||||
left_span: value.expect_span(),
|
||||
@ -248,7 +248,7 @@ impl UrlComponents {
|
||||
"query" => {
|
||||
if let Some(q) = self.query {
|
||||
if q != s {
|
||||
// if query is present it means that also params_span is setted.
|
||||
// if query is present it means that also params_span is set.
|
||||
return Err(ShellError::IncompatibleParameters {
|
||||
left_message: format!("Mismatch, query param is: {}", s),
|
||||
left_span: value.expect_span(),
|
||||
|
@ -23,7 +23,7 @@ use nu_protocol::{ast::Call, ShellError};
|
||||
pub fn grapheme_flags(call: &Call) -> Result<bool, ShellError> {
|
||||
let g_flag = call.has_flag("grapheme-clusters");
|
||||
// Check for the other flags and produce errors if they exist.
|
||||
// Note that Nushell already prevents nonexistant flags from being used with commands,
|
||||
// Note that Nushell already prevents nonexistent flags from being used with commands,
|
||||
// so this function can be reused for both the --utf-8-bytes commands and the --code-points commands.
|
||||
if g_flag && call.has_flag("utf-8-bytes") {
|
||||
Err(ShellError::IncompatibleParametersSingle(
|
||||
|
Reference in New Issue
Block a user