diff --git a/src/build/app/mod.rs b/src/build/app/mod.rs index f38e4820408..d1e8cb7bcc8 100644 --- a/src/build/app/mod.rs +++ b/src/build/app/mod.rs @@ -821,7 +821,7 @@ impl<'help> App<'help> { /// Does awesome things\n\ /// (C) me@mail.com\n\n\ /// - /// USAGE: myapp \n\n\ + /// USAGE: myapp \n\n\ /// /// Options:\n\ /// -h, --help Display this message\n\ @@ -829,7 +829,7 @@ impl<'help> App<'help> { /// -s Do something with stuff\n\ /// -v Be verbose\n\n\ /// - /// Commmands:\n\ + /// Commands:\n\ /// help Print this message\n\ /// work Do some work") /// # ; @@ -2490,7 +2490,7 @@ impl<'help> App<'help> { // Remove generated help and version args in the subcommand // - // Don't remove if those args are futher mutated + // Don't remove if those args are further mutated if is_generated { let generated_pos = sc .args @@ -2743,7 +2743,7 @@ impl<'help> App<'help> { // Print val_name for positional arguments. e.g. x.name_no_brackets().to_string() } else { - // Print useage string for flags arguments, e.g. <--help> + // Print usage string for flags arguments, e.g. <--help> x.to_string() } }) diff --git a/src/build/arg/mod.rs b/src/build/arg/mod.rs index 813b097b240..eff596daa74 100644 --- a/src/build/arg/mod.rs +++ b/src/build/arg/mod.rs @@ -4367,7 +4367,7 @@ impl<'help> Arg<'help> { /// assert_eq!(files, ["file1", "file2", "file3"]); /// ``` /// - /// Although `MultipleVlaues` has been specified, we cannot use the argument more than once. + /// Although `MultipleValues` has been specified, we cannot use the argument more than once. /// /// ```rust /// # use clap::{App, Arg, ErrorKind, ArgSettings}; @@ -5120,7 +5120,7 @@ where } } } else if let Some(num_vals) = arg.num_vals { - // If number_of_values is sepcified, display the value multiple times. + // If number_of_values is specified, display the value multiple times. let arg_name = format!("<{}>", arg.name); let mut it = iter::repeat(&arg_name).take(num_vals).peekable(); while let Some(arg_name) = it.next() { diff --git a/src/build/arg/possible_value.rs b/src/build/arg/possible_value.rs index 34420e0c7bf..33aba43c381 100644 --- a/src/build/arg/possible_value.rs +++ b/src/build/arg/possible_value.rs @@ -107,7 +107,7 @@ impl<'help> PossibleValue<'help> { impl<'help> PossibleValue<'help> { /// Creates a new instance of [`PossibleValue`] using a string name. The name will be used to - /// decide wether this value was provided by the user to an argument. + /// decide whether this value was provided by the user to an argument. /// /// **NOTE:** In case it is not [hidden] it will also be shown in help messages for arguments /// that use it as a [possible value] and have not hidden them through [`Arg::hide_possible_values(true)`]. diff --git a/src/output/help.rs b/src/output/help.rs index 3850d5d9ccc..6c7423935e2 100644 --- a/src/output/help.rs +++ b/src/output/help.rs @@ -1039,7 +1039,7 @@ mod test { #[test] fn display_width_handles_non_ascii() { - // Popular Danish tounge-twister, the name of a fruit dessert. + // Popular Danish tongue-twister, the name of a fruit dessert. let text = "rødgrød med fløde"; assert_eq!(display_width(text), 17); // Note that the string width is smaller than the string diff --git a/typos.toml b/typos.toml new file mode 100644 index 00000000000..8ccd969f308 --- /dev/null +++ b/typos.toml @@ -0,0 +1,8 @@ +files.extend-exclude = [ + "CHANGELOG.md", + "tests", +] +[default.extend-words] +# Acronyms +als = "als" +lits = "lits"