diff --git a/CHANGELOG.md b/CHANGELOG.md
index ec8891c0829..0cce7a2259c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -940,7 +940,7 @@ Minimum version of Rust is now v1.13.0 (Stable)
* doesn't include the various [ARGS] [FLAGS] or [OPTIONS] if the only ones available are hidden ([7b4000af](https://github.com/kbknapp/clap-rs/commit/7b4000af97637703645c5fb2ac8bb65bd546b95b), closes [#882](https://github.com/kbknapp/clap-rs/issues/882))
* now correctly shows subcommand as required in the usage string when AppSettings::SubcommandRequiredElseHelp is used ([8f0884c1](https://github.com/kbknapp/clap-rs/commit/8f0884c1764983a49b45de52a1eddf8d721564d8))
* fixes some memory leaks when an error is detected and clap exits ([8c2dd287](https://github.com/kbknapp/clap-rs/commit/8c2dd28718262ace4ae0db98563809548e02a86b))
-* fixes a trait that's marked private accidentlly, but should be crate internal public ([1ae21108](https://github.com/kbknapp/clap-rs/commit/1ae21108015cea87e5360402e1747025116c7878))
+* fixes a trait that's marked private accidentally, but should be crate internal public ([1ae21108](https://github.com/kbknapp/clap-rs/commit/1ae21108015cea87e5360402e1747025116c7878))
* **Completions:** fixes a bug that tried to propagate global args multiple times when generating multiple completion scripts ([5e9b9cf4](https://github.com/kbknapp/clap-rs/commit/5e9b9cf4dd80fa66a624374fd04e6545635c1f94), closes [#846](https://github.com/kbknapp/clap-rs/issues/846))
#### Features
@@ -1718,7 +1718,7 @@ Minimum version of Rust is now v1.13.0 (Stable)
#### Bug Fixes
-* **Required Args:** fixes issue where missing required args are sometimes duplicatd in error messages ([3beebd81](https://github.com/kbknapp/clap-rs/commit/3beebd81e7bc2faa4115ac109cf570e512c5477f), closes [#492](https://github.com/kbknapp/clap-rs/issues/492))
+* **Required Args:** fixes issue where missing required args are sometimes duplicated in error messages ([3beebd81](https://github.com/kbknapp/clap-rs/commit/3beebd81e7bc2faa4115ac109cf570e512c5477f), closes [#492](https://github.com/kbknapp/clap-rs/issues/492))
@@ -1854,7 +1854,7 @@ Minimum version of Rust is now v1.13.0 (Stable)
#### Features
-* **Defult Values:** adds support for default values in args ([73211952](https://github.com/kbknapp/clap-rs/commit/73211952964a79d97b434dd567e6d7d34be7feb5), closes [#418](https://github.com/kbknapp/clap-rs/issues/418))
+* **Default Values:** adds support for default values in args ([73211952](https://github.com/kbknapp/clap-rs/commit/73211952964a79d97b434dd567e6d7d34be7feb5), closes [#418](https://github.com/kbknapp/clap-rs/issues/418))
#### Documentation
@@ -2213,7 +2213,7 @@ Minimum version of Rust is now v1.13.0 (Stable)
#### Features
-* **Unicode:** allows non-panicing on invalid unicode characters ([c5bf7ddc](https://github.com/kbknapp/clap-rs/commit/c5bf7ddc8cfb876ec928a5aaf5591232bbb32e5d))
+* **Unicode:** allows non-panicking on invalid unicode characters ([c5bf7ddc](https://github.com/kbknapp/clap-rs/commit/c5bf7ddc8cfb876ec928a5aaf5591232bbb32e5d))
#### Documentation
@@ -2256,7 +2256,7 @@ Minimum version of Rust is now v1.13.0 (Stable)
#### Features
-* adds abiltiy not consume self when parsing matches and/or exit on help ([94003db4](https://github.com/kbknapp/clap-rs/commit/94003db4b5eebe552ca337521c1c001295822745))
+* adds ability not consume self when parsing matches and/or exit on help ([94003db4](https://github.com/kbknapp/clap-rs/commit/94003db4b5eebe552ca337521c1c001295822745))
* **App:** Added ability for users to handle errors themselves ([934e6fbb](https://github.com/kbknapp/clap-rs/commit/934e6fbb643b2385efc23444fe6fce31494dc288))
diff --git a/bors.toml b/bors.toml
index ccb3d83b8ff..3b7924305e6 100644
--- a/bors.toml
+++ b/bors.toml
@@ -8,4 +8,4 @@ timeout_sec = 7200
prerun_timeout_sec = 7200
delete_merged_branches = true
cut_body_after = ""
-block_lables = ["M: blocked", "M: require changes"]
+block_labels = ["M: blocked", "M: require changes"]
diff --git a/clap.schema.json b/clap.schema.json
index 97a46873ae6..31998445a84 100644
--- a/clap.schema.json
+++ b/clap.schema.json
@@ -155,7 +155,7 @@
"min_values": {
"type": "integer"
},
- "multiple_occurences": {
+ "multiple_occurrences": {
"type": "boolean"
},
"multiple_values": {
diff --git a/clap_derive/README.md b/clap_derive/README.md
index 0367163e331..e0cc66ae6dc 100644
--- a/clap_derive/README.md
+++ b/clap_derive/README.md
@@ -132,7 +132,7 @@ Opt {
## clap_derive rustc version policy
- Minimum rustc version modification must be specified in the [changelog](https://github.com/clap-rs/clap_derive/blob/master/CHANGELOG.md) and in the [travis configuration](https://github.com/clap-rs/clap_derive/blob/master/.travis.yaml).
-- Contributors can increment minimum rustc version without any justification if the new version is required by the latest version of one of clap_derive's depedencies (`cargo update` will not fail on clap_derive).
+- Contributors can increment minimum rustc version without any justification if the new version is required by the latest version of one of clap_derive's dependencies (`cargo update` will not fail on clap_derive).
- Contributors can increment minimum rustc version if the library user experience is improved.
## Why
diff --git a/clap_derive/tests/arg_enum.rs b/clap_derive/tests/arg_enum.rs
index 67ee114fa60..dd77ccc62e8 100644
--- a/clap_derive/tests/arg_enum.rs
+++ b/clap_derive/tests/arg_enum.rs
@@ -138,7 +138,7 @@ fn variant_with_defined_casing() {
}
#[test]
-fn casing_is_propogated_from_parent() {
+fn casing_is_propagated_from_parent() {
#[derive(ArgEnum, PartialEq, Debug, Clone)]
#[clap(rename_all = "screaming_snake")]
enum ArgChoice {
@@ -161,7 +161,7 @@ fn casing_is_propogated_from_parent() {
}
#[test]
-fn casing_propogation_is_overridden() {
+fn casing_propagation_is_overridden() {
#[derive(ArgEnum, PartialEq, Debug, Clone)]
#[clap(rename_all = "screaming_snake")]
enum ArgChoice {
diff --git a/clap_derive/tests/rename_all_env.rs b/clap_derive/tests/rename_all_env.rs
index 4c9fd29eff1..3be3681150f 100644
--- a/clap_derive/tests/rename_all_env.rs
+++ b/clap_derive/tests/rename_all_env.rs
@@ -37,10 +37,10 @@ fn overridable() {
be_nice: String,
#[clap(rename_all_env = "pascal", env)]
- be_agressive: String,
+ be_aggressive: String,
}
let help = get_help::();
assert!(help.contains("[env: be-nice=]"));
- assert!(help.contains("[env: BeAgressive=]"));
+ assert!(help.contains("[env: BeAggressive=]"));
}
diff --git a/clap_generate/tests/completions/bash.rs b/clap_generate/tests/completions/bash.rs
index ca0b94b83a6..1ed1a650bc8 100644
--- a/clap_generate/tests/completions/bash.rs
+++ b/clap_generate/tests/completions/bash.rs
@@ -125,7 +125,7 @@ fn build_app_special_commands() -> App<'static> {
.about("the other case to test"),
),
)
- .subcommand(App::new("some-cmd-with-hypens").alias("hyphen"))
+ .subcommand(App::new("some-cmd-with-hyphens").alias("hyphen"))
}
static BASH_SPECIAL_CMDS: &str = r#"_my_app() {
@@ -145,8 +145,8 @@ static BASH_SPECIAL_CMDS: &str = r#"_my_app() {
help)
cmd+="__help"
;;
- some-cmd-with-hypens)
- cmd+="__some__cmd__with__hypens"
+ some-cmd-with-hyphens)
+ cmd+="__some__cmd__with__hyphens"
;;
some_cmd)
cmd+="__some_cmd"
@@ -161,7 +161,7 @@ static BASH_SPECIAL_CMDS: &str = r#"_my_app() {
case "${cmd}" in
my_app)
- opts="-h -V --help --version first second test some_cmd some-cmd-with-hypens help"
+ opts="-h -V --help --version first second test some_cmd some-cmd-with-hyphens help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -188,7 +188,7 @@ static BASH_SPECIAL_CMDS: &str = r#"_my_app() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
- my_app__some__cmd__with__hypens)
+ my_app__some__cmd__with__hyphens)
opts="-h -V --help --version"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
diff --git a/clap_generate/tests/completions/elvish.rs b/clap_generate/tests/completions/elvish.rs
index 07b19f5f12e..15bd15980ab 100644
--- a/clap_generate/tests/completions/elvish.rs
+++ b/clap_generate/tests/completions/elvish.rs
@@ -89,7 +89,7 @@ fn build_app_special_commands() -> App<'static> {
.about("the other case to test"),
),
)
- .subcommand(App::new("some-cmd-with-hypens").alias("hyphen"))
+ .subcommand(App::new("some-cmd-with-hyphens").alias("hyphen"))
}
static ELVISH_SPECIAL_CMDS: &str = r#"
@@ -118,7 +118,7 @@ set edit:completion:arg-completer[my_app] = [@words]{
cand --version 'Print version information'
cand test 'tests things'
cand some_cmd 'tests other things'
- cand some-cmd-with-hypens 'some-cmd-with-hypens'
+ cand some-cmd-with-hyphens 'some-cmd-with-hyphens'
cand help 'Print this message or the help of the given subcommand(s)'
}
&'my_app;test'= {
@@ -135,7 +135,7 @@ set edit:completion:arg-completer[my_app] = [@words]{
cand -V 'Print version information'
cand --version 'Print version information'
}
- &'my_app;some-cmd-with-hypens'= {
+ &'my_app;some-cmd-with-hyphens'= {
cand -h 'Print help information'
cand --help 'Print help information'
cand -V 'Print version information'
diff --git a/clap_generate/tests/completions/fish.rs b/clap_generate/tests/completions/fish.rs
index 8456027bc70..e3a80a520e7 100644
--- a/clap_generate/tests/completions/fish.rs
+++ b/clap_generate/tests/completions/fish.rs
@@ -56,14 +56,14 @@ fn build_app_special_commands() -> App<'static> {
.about("the other case to test"),
),
)
- .subcommand(App::new("some-cmd-with-hypens").alias("hyphen"))
+ .subcommand(App::new("some-cmd-with-hyphens").alias("hyphen"))
}
static FISH_SPECIAL_CMDS: &str = r#"complete -c my_app -n "__fish_use_subcommand" -s h -l help -d 'Print help information'
complete -c my_app -n "__fish_use_subcommand" -s V -l version -d 'Print version information'
complete -c my_app -n "__fish_use_subcommand" -f -a "test" -d 'tests things'
complete -c my_app -n "__fish_use_subcommand" -f -a "some_cmd" -d 'tests other things'
-complete -c my_app -n "__fish_use_subcommand" -f -a "some-cmd-with-hypens"
+complete -c my_app -n "__fish_use_subcommand" -f -a "some-cmd-with-hyphens"
complete -c my_app -n "__fish_use_subcommand" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c my_app -n "__fish_seen_subcommand_from test" -l case -d 'the case to test' -r
complete -c my_app -n "__fish_seen_subcommand_from test" -s h -l help -d 'Print help information'
@@ -71,8 +71,8 @@ complete -c my_app -n "__fish_seen_subcommand_from test" -s V -l version -d 'Pri
complete -c my_app -n "__fish_seen_subcommand_from some_cmd" -l config -d 'the other case to test' -r
complete -c my_app -n "__fish_seen_subcommand_from some_cmd" -s h -l help -d 'Print help information'
complete -c my_app -n "__fish_seen_subcommand_from some_cmd" -s V -l version -d 'Print version information'
-complete -c my_app -n "__fish_seen_subcommand_from some-cmd-with-hypens" -s h -l help -d 'Print help information'
-complete -c my_app -n "__fish_seen_subcommand_from some-cmd-with-hypens" -s V -l version -d 'Print version information'
+complete -c my_app -n "__fish_seen_subcommand_from some-cmd-with-hyphens" -s h -l help -d 'Print help information'
+complete -c my_app -n "__fish_seen_subcommand_from some-cmd-with-hyphens" -s V -l version -d 'Print version information'
complete -c my_app -n "__fish_seen_subcommand_from help" -s h -l help -d 'Print help information'
"#;
diff --git a/clap_generate/tests/completions/powershell.rs b/clap_generate/tests/completions/powershell.rs
index de8ffa1e82c..9f4ea7281ee 100644
--- a/clap_generate/tests/completions/powershell.rs
+++ b/clap_generate/tests/completions/powershell.rs
@@ -108,7 +108,7 @@ fn build_app_special_commands() -> App<'static> {
.about("the other case to test"),
),
)
- .subcommand(App::new("some-cmd-with-hypens").alias("hyphen"))
+ .subcommand(App::new("some-cmd-with-hyphens").alias("hyphen"))
}
static POWERSHELL_SPECIAL_CMDS: &str = r#"
@@ -143,7 +143,7 @@ Register-ArgumentCompleter -Native -CommandName 'my_app' -ScriptBlock {
[CompletionResult]::new('--conf', 'conf', [CompletionResultType]::ParameterName, 'some config file')
[CompletionResult]::new('test', 'test', [CompletionResultType]::ParameterValue, 'tests things')
[CompletionResult]::new('some_cmd', 'some_cmd', [CompletionResultType]::ParameterValue, 'tests other things')
- [CompletionResult]::new('some-cmd-with-hypens', 'some-cmd-with-hypens', [CompletionResultType]::ParameterValue, 'some-cmd-with-hypens')
+ [CompletionResult]::new('some-cmd-with-hyphens', 'some-cmd-with-hyphens', [CompletionResultType]::ParameterValue, 'some-cmd-with-hyphens')
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
break
}
@@ -163,7 +163,7 @@ Register-ArgumentCompleter -Native -CommandName 'my_app' -ScriptBlock {
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version information')
break
}
- 'my_app;some-cmd-with-hypens' {
+ 'my_app;some-cmd-with-hyphens' {
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information')
diff --git a/clap_generate_fig/tests/completions/fig.rs b/clap_generate_fig/tests/completions/fig.rs
index 49124646bb7..62107c400c2 100644
--- a/clap_generate_fig/tests/completions/fig.rs
+++ b/clap_generate_fig/tests/completions/fig.rs
@@ -104,7 +104,7 @@ fn build_app_special_commands() -> App<'static> {
.about("the other case to test"),
),
)
- .subcommand(App::new("some-cmd-with-hypens").alias("hyphen"))
+ .subcommand(App::new("some-cmd-with-hyphens").alias("hyphen"))
}
static FIG_SPECIAL_CMDS: &str = r#"const completion: Fig.Spec = {
@@ -156,7 +156,7 @@ static FIG_SPECIAL_CMDS: &str = r#"const completion: Fig.Spec = {
],
},
{
- name: "some-cmd-with-hypens",
+ name: "some-cmd-with-hyphens",
options: [
{
name: ["-h", "--help"],
diff --git a/clap_up/src/lib.rs b/clap_up/src/lib.rs
index 31249c65ad6..552db041498 100644
--- a/clap_up/src/lib.rs
+++ b/clap_up/src/lib.rs
@@ -42,7 +42,7 @@ pub fn runner() -> Runner {
&[
["DisableHelpFlags", "DisableHelpFlag"],
["DisableVersion", "DisableVersionFlag"],
- // @TODO @v3 shoud be removed, not renamed
+ // @TODO @v3 should be removed, not renamed
["VersionlessSubcommands", "DisableVersionForSubcommands"],
],
)
diff --git a/examples/03_args.rs b/examples/03_args.rs
index 7e51edf09d4..e9c6da57b5d 100644
--- a/examples/03_args.rs
+++ b/examples/03_args.rs
@@ -75,7 +75,7 @@ fn main() {
println!("A config file was passed in: {}", config);
}
- // Let's print the file the user passed in. We can use .unwrap() here becase the arg is
+ // Let's print the file the user passed in. We can use .unwrap() here because the arg is
// required, and parsing would have failed if the user forgot it
println!("Using input file: {}", matches.value_of("input").unwrap());
diff --git a/examples/10_default_values.rs b/examples/10_default_values.rs
index a6054c40d66..73762119fe7 100644
--- a/examples/10_default_values.rs
+++ b/examples/10_default_values.rs
@@ -22,7 +22,7 @@ fn main() {
// Next we'll use the Option::unwrap_or method on this "CONFIG" option
.arg(
Arg::new("CONFIG")
- // Note that we have to manaully include some verbage to the user
+ // Note that we have to manually include some verbage to the user
// telling them what the default will be.
.about("The config file to use (default is \"config.json\")")
.short('c')
diff --git a/src/build/arg/mod.rs b/src/build/arg/mod.rs
index 4d48eac1f09..01766d331e8 100644
--- a/src/build/arg/mod.rs
+++ b/src/build/arg/mod.rs
@@ -2032,7 +2032,7 @@ impl<'help> Arg<'help> {
///
/// **NOTE:** This setting only applies to [options] and [positional arguments]
///
- /// **NOTE:** You can use both strings directly or use [`ArgValue`] if you want more controll
+ /// **NOTE:** You can use both strings directly or use [`ArgValue`] if you want more control
/// over single possible values.
///
/// # Examples
@@ -3739,7 +3739,7 @@ impl<'help> Arg<'help> {
/// # ;
/// ```
///
- /// For example, assume an appliction with two subcommands, and you'd like to define a
+ /// For example, assume an application with two subcommands, and you'd like to define a
/// `--verbose` flag that can be called on any of the subcommands and parent, but you don't
/// want to clutter the source with three duplicate [`Arg`] definitions.
///
diff --git a/src/build/arg/tests.rs b/src/build/arg/tests.rs
index 0d78630e3bd..9e44f3aa3c7 100644
--- a/src/build/arg/tests.rs
+++ b/src/build/arg/tests.rs
@@ -1,7 +1,7 @@
use super::{settings::ArgSettings, Arg};
#[test]
-fn short_flag_misspel() {
+fn short_flag_misspell() {
let a = Arg::from("-f1, --flag 'some flag'");
assert_eq!(a.name, "flag");
assert_eq!(a.short.unwrap(), 'f');
diff --git a/src/output/usage.rs b/src/output/usage.rs
index ac3a8072a5f..884abf0efee 100644
--- a/src/output/usage.rs
+++ b/src/output/usage.rs
@@ -66,8 +66,8 @@ impl<'help, 'app, 'parser> Usage<'help, 'app, 'parser> {
usage.push_str(" [OPTIONS]");
}
- let allow_mising_positional = self.p.app.is_set(AS::AllowMissingPositional);
- if !allow_mising_positional {
+ let allow_missing_positional = self.p.app.is_set(AS::AllowMissingPositional);
+ if !allow_missing_positional {
usage.push_str(&req_string);
}
@@ -135,7 +135,7 @@ impl<'help, 'app, 'parser> Usage<'help, 'app, 'parser> {
}
}
- if allow_mising_positional {
+ if allow_missing_positional {
usage.push_str(&req_string);
}
diff --git a/src/parse/errors.rs b/src/parse/errors.rs
index 11e0a48c5dd..fb3339919af 100644
--- a/src/parse/errors.rs
+++ b/src/parse/errors.rs
@@ -126,7 +126,7 @@ pub enum ErrorKind {
/// ```
EmptyValue,
- /// Occurs when the user doesn't use equals for an option that requres equal
+ /// Occurs when the user doesn't use equals for an option that requires equal
/// sign to provide values.
///
/// ```rust
diff --git a/src/parse/matches/arg_matches.rs b/src/parse/matches/arg_matches.rs
index 14359a7a010..494f8005f91 100644
--- a/src/parse/matches/arg_matches.rs
+++ b/src/parse/matches/arg_matches.rs
@@ -628,8 +628,8 @@ impl ArgMatches {
/// .short('o')
/// .takes_value(true))
/// .get_matches_from(vec!["myapp", "-f", "-o", "val"]);
- /// // ARGV idices: ^0 ^1 ^2 ^3
- /// // clap idices: ^1 ^3
+ /// // ARGV indices: ^0 ^1 ^2 ^3
+ /// // clap indices: ^1 ^3
///
/// assert_eq!(m.index_of("flag"), Some(1));
/// assert_eq!(m.index_of("option"), Some(3));
@@ -646,8 +646,8 @@ impl ArgMatches {
/// .short('o')
/// .takes_value(true))
/// .get_matches_from(vec!["myapp", "-f", "-o=val"]);
- /// // ARGV idices: ^0 ^1 ^2
- /// // clap idices: ^1 ^3
+ /// // ARGV indices: ^0 ^1 ^2
+ /// // clap indices: ^1 ^3
///
/// assert_eq!(m.index_of("flag"), Some(1));
/// assert_eq!(m.index_of("option"), Some(3));
@@ -669,11 +669,11 @@ impl ArgMatches {
/// .short('o')
/// .takes_value(true))
/// .get_matches_from(vec!["myapp", "-fzF", "-oval"]);
- /// // ARGV idices: ^0 ^1 ^2
- /// // clap idices: ^1,2,3 ^5
- /// //
- /// // clap sees the above as 'myapp -f -z -F -o val'
- /// // ^0 ^1 ^2 ^3 ^4 ^5
+ /// // ARGV indices: ^0 ^1 ^2
+ /// // clap indices: ^1,2,3 ^5
+ /// //
+ /// // clap sees the above as 'myapp -f -z -F -o val'
+ /// // ^0 ^1 ^2 ^3 ^4 ^5
/// assert_eq!(m.index_of("flag"), Some(1));
/// assert_eq!(m.index_of("flag2"), Some(3));
/// assert_eq!(m.index_of("flag3"), Some(2));
@@ -695,11 +695,11 @@ impl ArgMatches {
/// .short('o')
/// .takes_value(true))
/// .get_matches_from(vec!["myapp", "-fzFoval"]);
- /// // ARGV idices: ^0 ^1
- /// // clap idices: ^1,2,3^5
- /// //
- /// // clap sees the above as 'myapp -f -z -F -o val'
- /// // ^0 ^1 ^2 ^3 ^4 ^5
+ /// // ARGV indices: ^0 ^1
+ /// // clap indices: ^1,2,3^5
+ /// //
+ /// // clap sees the above as 'myapp -f -z -F -o val'
+ /// // ^0 ^1 ^2 ^3 ^4 ^5
/// assert_eq!(m.index_of("flag"), Some(1));
/// assert_eq!(m.index_of("flag2"), Some(3));
/// assert_eq!(m.index_of("flag3"), Some(2));
@@ -716,11 +716,11 @@ impl ArgMatches {
/// .use_delimiter(true)
/// .multiple_values(true))
/// .get_matches_from(vec!["myapp", "-o=val1,val2,val3"]);
- /// // ARGV idices: ^0 ^1
- /// // clap idices: ^2 ^3 ^4
- /// //
- /// // clap sees the above as 'myapp -o val1 val2 val3'
- /// // ^0 ^1 ^2 ^3 ^4
+ /// // ARGV indices: ^0 ^1
+ /// // clap indices: ^2 ^3 ^4
+ /// //
+ /// // clap sees the above as 'myapp -o val1 val2 val3'
+ /// // ^0 ^1 ^2 ^3 ^4
/// assert_eq!(m.index_of("option"), Some(2));
/// assert_eq!(m.indices_of("option").unwrap().collect::>(), &[2, 3, 4]);
/// ```
@@ -755,11 +755,11 @@ impl ArgMatches {
/// .use_delimiter(true)
/// .multiple_values(true))
/// .get_matches_from(vec!["myapp", "-o=val1,val2,val3"]);
- /// // ARGV idices: ^0 ^1
- /// // clap idices: ^2 ^3 ^4
- /// //
- /// // clap sees the above as 'myapp -o val1 val2 val3'
- /// // ^0 ^1 ^2 ^3 ^4
+ /// // ARGV indices: ^0 ^1
+ /// // clap indices: ^2 ^3 ^4
+ /// //
+ /// // clap sees the above as 'myapp -o val1 val2 val3'
+ /// // ^0 ^1 ^2 ^3 ^4
/// assert_eq!(m.indices_of("option").unwrap().collect::>(), &[2, 3, 4]);
/// ```
///
@@ -776,8 +776,8 @@ impl ArgMatches {
/// .short('f')
/// .multiple_occurrences(true))
/// .get_matches_from(vec!["myapp", "-o", "val1", "-f", "-o", "val2", "-f"]);
- /// // ARGV idices: ^0 ^1 ^2 ^3 ^4 ^5 ^6
- /// // clap idices: ^2 ^3 ^5 ^6
+ /// // ARGV indices: ^0 ^1 ^2 ^3 ^4 ^5 ^6
+ /// // clap indices: ^2 ^3 ^5 ^6
///
/// assert_eq!(m.indices_of("option").unwrap().collect::>(), &[2, 5]);
/// assert_eq!(m.indices_of("flag").unwrap().collect::>(), &[3, 6]);
@@ -796,11 +796,11 @@ impl ArgMatches {
/// .takes_value(true)
/// .multiple_values(true))
/// .get_matches_from(vec!["myapp", "-o=val1,val2,val3"]);
- /// // ARGV idices: ^0 ^1
- /// // clap idices: ^2
- /// //
- /// // clap sees the above as 'myapp -o "val1,val2,val3"'
- /// // ^0 ^1 ^2
+ /// // ARGV indices: ^0 ^1
+ /// // clap indices: ^2
+ /// //
+ /// // clap sees the above as 'myapp -o "val1,val2,val3"'
+ /// // ^0 ^1 ^2
/// assert_eq!(m.indices_of("option").unwrap().collect::>(), &[2]);
/// ```
/// [`ArgMatches::index_of`]: ArgMatches::index_of()
diff --git a/src/parse/parser.rs b/src/parse/parser.rs
index 83325feee15..29d16272977 100644
--- a/src/parse/parser.rs
+++ b/src/parse/parser.rs
@@ -665,7 +665,7 @@ impl<'help, 'app> Parser<'help, 'app> {
self.seen.push(p.id.clone());
// Creating new value group rather than appending when the arg
// doesn't have any value. This behaviour is right because
- // positional arguments are always present continiously.
+ // positional arguments are always present continuously.
let append = self.arg_have_val(matcher, p);
self.add_val_to_arg(
p,
diff --git a/tests/macros.rs b/tests/macros.rs
index b74388fb153..241e6becc0c 100644
--- a/tests/macros.rs
+++ b/tests/macros.rs
@@ -410,7 +410,7 @@ fn group_macro_multiple_methods_alternative() {
}
#[test]
-fn group_macro_multiple_invokations() {
+fn group_macro_multiple_invocations() {
#![allow(deprecated)]
let app = clap::clap_app!(claptests =>
(version: "0.1")
diff --git a/tests/multiple_occurrences.rs b/tests/multiple_occurrences.rs
index 745d87e0b65..86cd4c3cd9e 100644
--- a/tests/multiple_occurrences.rs
+++ b/tests/multiple_occurrences.rs
@@ -65,7 +65,7 @@ fn multiple_occurrences_of_flags_large_quantity() {
.into_iter()
.chain(vec!["-m"; 1024].into_iter())
.collect();
- let m = App::new("mo_flags_larg_qty")
+ let m = App::new("mo_flags_large_qty")
.arg(
Arg::from("-m --multflag 'allowed multiple flag'")
.setting(ArgSettings::MultipleOccurrences),
diff --git a/tests/yaml.rs b/tests/yaml.rs
index 27fc88e9b8c..ce93730a999 100644
--- a/tests/yaml.rs
+++ b/tests/yaml.rs
@@ -5,7 +5,7 @@ use clap::{load_yaml, App, Arg, ErrorKind, ValueHint};
#[test]
fn create_app_from_yaml() {
let yaml = load_yaml!("fixtures/app.yaml");
- App::from(yaml);
+ let _ = App::from(yaml);
}
// TODO: Uncomment to test yaml with 2 spaces https://github.com/chyh1990/yaml-rust/issues/101
@@ -61,14 +61,14 @@ fn app_settings() {
#[should_panic = "Unknown AppSetting 'random' found in YAML file for app"]
fn app_setting_invalid() {
let yaml = load_yaml!("fixtures/app_setting_invalid.yaml");
- App::from(yaml);
+ let _ = App::from(yaml);
}
#[test]
#[should_panic = "Unknown ArgSetting 'random' found in YAML file for arg 'option'"]
fn arg_setting_invalid() {
let yaml = load_yaml!("fixtures/arg_setting_invalid.yaml");
- App::from(yaml);
+ let _ = App::from(yaml);
}
// ValueHint must be parsed correctly from Yaml
@@ -179,34 +179,34 @@ fn regex_with_valid_string() {
#[should_panic]
fn regex_with_invalid_yaml() {
let yml = load_yaml!("fixtures/app_regex_invalid.yaml");
- App::from(yml);
+ let _ = App::from(yml);
}
#[test]
fn extra_fields() {
let yml = load_yaml!("fixtures/extra_fields.yaml");
- App::from(yml);
+ let _ = App::from(yml);
}
#[test]
#[should_panic = "Unknown setting 'random' in YAML file for arg 'option'"]
fn extra_fields_invalid_arg() {
let yml = load_yaml!("fixtures/extra_fields_invalid_arg.yaml");
- App::from(yml);
+ let _ = App::from(yml);
}
#[test]
#[should_panic = "Unknown setting 'random' in YAML file for subcommand 'info'"]
fn extra_fields_invalid_app() {
let yml = load_yaml!("fixtures/extra_fields_invalid_app.yaml");
- App::from(yml);
+ let _ = App::from(yml);
}
#[test]
#[should_panic = "YAML file must be a hash"]
fn app_not_hash() {
let yml = load_yaml!("fixtures/not_hash.yaml");
- App::from(yml);
+ let _ = App::from(yml);
}
#[test]
@@ -220,21 +220,21 @@ fn arg_file_not_hash() {
#[should_panic = "Subcommand must be a hash"]
fn subcommand_not_hash() {
let yml = load_yaml!("fixtures/field_not_hash.yaml");
- App::from(yml);
+ let _ = App::from(yml);
}
#[test]
#[should_panic = "Arg must be a hash"]
fn arg_not_hash() {
let yml = load_yaml!("fixtures/arg_not_hash.yaml");
- App::from(yml);
+ let _ = App::from(yml);
}
#[test]
#[should_panic = "Subcommand name must be a string"]
fn subcommand_name_not_string() {
let yml = load_yaml!("fixtures/name_not_string.yaml");
- App::from(yml);
+ let _ = App::from(yml);
}
#[test]
@@ -248,7 +248,7 @@ fn arg_name_not_string() {
#[should_panic = "App fields must be strings"]
fn app_field_not_string() {
let yml = load_yaml!("fixtures/app_field_not_string.yaml");
- App::from(yml);
+ let _ = App::from(yml);
}
#[test]