Skip to content

Commit 012f318

Browse files
committed
feat(doc): Fix many typos in docs, comments and codes found by typos-cli
1 parent 693fae5 commit 012f318

File tree

22 files changed

+58
-58
lines changed

22 files changed

+58
-58
lines changed

CHANGELOG.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ Minimum version of Rust is now v1.13.0 (Stable)
940940
* 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))
941941
* now correctly shows subcommand as required in the usage string when AppSettings::SubcommandRequiredElseHelp is used ([8f0884c1](https://github.com/kbknapp/clap-rs/commit/8f0884c1764983a49b45de52a1eddf8d721564d8))
942942
* fixes some memory leaks when an error is detected and clap exits ([8c2dd287](https://github.com/kbknapp/clap-rs/commit/8c2dd28718262ace4ae0db98563809548e02a86b))
943-
* fixes a trait that's marked private accidentlly, but should be crate internal public ([1ae21108](https://github.com/kbknapp/clap-rs/commit/1ae21108015cea87e5360402e1747025116c7878))
943+
* fixes a trait that's marked private accidentally, but should be crate internal public ([1ae21108](https://github.com/kbknapp/clap-rs/commit/1ae21108015cea87e5360402e1747025116c7878))
944944
* **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))
945945

946946
#### Features
@@ -1718,7 +1718,7 @@ Minimum version of Rust is now v1.13.0 (Stable)
17181718

17191719
#### Bug Fixes
17201720

1721-
* **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))
1721+
* **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))
17221722

17231723

17241724
<a name="v2.3.0"></a>
@@ -1854,7 +1854,7 @@ Minimum version of Rust is now v1.13.0 (Stable)
18541854

18551855
#### Features
18561856

1857-
* **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))
1857+
* **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))
18581858

18591859
#### Documentation
18601860

@@ -2213,7 +2213,7 @@ Minimum version of Rust is now v1.13.0 (Stable)
22132213

22142214
#### Features
22152215

2216-
* **Unicode:** allows non-panicing on invalid unicode characters ([c5bf7ddc](https://github.com/kbknapp/clap-rs/commit/c5bf7ddc8cfb876ec928a5aaf5591232bbb32e5d))
2216+
* **Unicode:** allows non-panicking on invalid unicode characters ([c5bf7ddc](https://github.com/kbknapp/clap-rs/commit/c5bf7ddc8cfb876ec928a5aaf5591232bbb32e5d))
22172217

22182218
#### Documentation
22192219

@@ -2256,7 +2256,7 @@ Minimum version of Rust is now v1.13.0 (Stable)
22562256

22572257
#### Features
22582258

2259-
* adds abiltiy not consume self when parsing matches and/or exit on help ([94003db4](https://github.com/kbknapp/clap-rs/commit/94003db4b5eebe552ca337521c1c001295822745))
2259+
* adds ability not consume self when parsing matches and/or exit on help ([94003db4](https://github.com/kbknapp/clap-rs/commit/94003db4b5eebe552ca337521c1c001295822745))
22602260
* **App:** Added ability for users to handle errors themselves ([934e6fbb](https://github.com/kbknapp/clap-rs/commit/934e6fbb643b2385efc23444fe6fce31494dc288))
22612261

22622262

bors.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ timeout_sec = 7200
88
prerun_timeout_sec = 7200
99
delete_merged_branches = true
1010
cut_body_after = ""
11-
block_lables = ["M: blocked", "M: require changes"]
11+
block_labels = ["M: blocked", "M: require changes"]

clap.schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
"min_values": {
156156
"type": "integer"
157157
},
158-
"multiple_occurences": {
158+
"multiple_occurrences": {
159159
"type": "boolean"
160160
},
161161
"multiple_values": {

clap_derive/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Opt {
132132
## clap_derive rustc version policy
133133

134134
- 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).
135-
- 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).
135+
- 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).
136136
- Contributors can increment minimum rustc version if the library user experience is improved.
137137

138138
## Why

clap_derive/tests/arg_enum.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ fn variant_with_defined_casing() {
138138
}
139139

140140
#[test]
141-
fn casing_is_propogated_from_parent() {
141+
fn casing_is_propagated_from_parent() {
142142
#[derive(ArgEnum, PartialEq, Debug, Clone)]
143143
#[clap(rename_all = "screaming_snake")]
144144
enum ArgChoice {
@@ -161,7 +161,7 @@ fn casing_is_propogated_from_parent() {
161161
}
162162

163163
#[test]
164-
fn casing_propogation_is_overridden() {
164+
fn casing_propagation_is_overridden() {
165165
#[derive(ArgEnum, PartialEq, Debug, Clone)]
166166
#[clap(rename_all = "screaming_snake")]
167167
enum ArgChoice {

clap_derive/tests/rename_all_env.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ fn overridable() {
3737
be_nice: String,
3838

3939
#[clap(rename_all_env = "pascal", env)]
40-
be_agressive: String,
40+
be_aggressive: String,
4141
}
4242

4343
let help = get_help::<BehaviorModel>();
4444
assert!(help.contains("[env: be-nice=]"));
45-
assert!(help.contains("[env: BeAgressive=]"));
45+
assert!(help.contains("[env: BeAggressive=]"));
4646
}

clap_generate/tests/completions/bash.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ fn build_app_special_commands() -> App<'static> {
125125
.about("the other case to test"),
126126
),
127127
)
128-
.subcommand(App::new("some-cmd-with-hypens").alias("hyphen"))
128+
.subcommand(App::new("some-cmd-with-hyphens").alias("hyphen"))
129129
}
130130

131131
static BASH_SPECIAL_CMDS: &str = r#"_my_app() {
@@ -145,8 +145,8 @@ static BASH_SPECIAL_CMDS: &str = r#"_my_app() {
145145
help)
146146
cmd+="__help"
147147
;;
148-
some-cmd-with-hypens)
149-
cmd+="__some__cmd__with__hypens"
148+
some-cmd-with-hyphens)
149+
cmd+="__some__cmd__with__hyphens"
150150
;;
151151
some_cmd)
152152
cmd+="__some_cmd"
@@ -161,7 +161,7 @@ static BASH_SPECIAL_CMDS: &str = r#"_my_app() {
161161
162162
case "${cmd}" in
163163
my_app)
164-
opts="-h -V --help --version <file> first second test some_cmd some-cmd-with-hypens help"
164+
opts="-h -V --help --version <file> first second test some_cmd some-cmd-with-hyphens help"
165165
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
166166
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
167167
return 0
@@ -188,7 +188,7 @@ static BASH_SPECIAL_CMDS: &str = r#"_my_app() {
188188
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
189189
return 0
190190
;;
191-
my_app__some__cmd__with__hypens)
191+
my_app__some__cmd__with__hyphens)
192192
opts="-h -V --help --version"
193193
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
194194
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )

clap_generate/tests/completions/elvish.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fn build_app_special_commands() -> App<'static> {
8989
.about("the other case to test"),
9090
),
9191
)
92-
.subcommand(App::new("some-cmd-with-hypens").alias("hyphen"))
92+
.subcommand(App::new("some-cmd-with-hyphens").alias("hyphen"))
9393
}
9494

9595
static ELVISH_SPECIAL_CMDS: &str = r#"
@@ -118,7 +118,7 @@ set edit:completion:arg-completer[my_app] = [@words]{
118118
cand --version 'Print version information'
119119
cand test 'tests things'
120120
cand some_cmd 'tests other things'
121-
cand some-cmd-with-hypens 'some-cmd-with-hypens'
121+
cand some-cmd-with-hyphens 'some-cmd-with-hyphens'
122122
cand help 'Print this message or the help of the given subcommand(s)'
123123
}
124124
&'my_app;test'= {
@@ -135,7 +135,7 @@ set edit:completion:arg-completer[my_app] = [@words]{
135135
cand -V 'Print version information'
136136
cand --version 'Print version information'
137137
}
138-
&'my_app;some-cmd-with-hypens'= {
138+
&'my_app;some-cmd-with-hyphens'= {
139139
cand -h 'Print help information'
140140
cand --help 'Print help information'
141141
cand -V 'Print version information'

clap_generate/tests/completions/fish.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,23 @@ fn build_app_special_commands() -> App<'static> {
5656
.about("the other case to test"),
5757
),
5858
)
59-
.subcommand(App::new("some-cmd-with-hypens").alias("hyphen"))
59+
.subcommand(App::new("some-cmd-with-hyphens").alias("hyphen"))
6060
}
6161

6262
static FISH_SPECIAL_CMDS: &str = r#"complete -c my_app -n "__fish_use_subcommand" -s h -l help -d 'Print help information'
6363
complete -c my_app -n "__fish_use_subcommand" -s V -l version -d 'Print version information'
6464
complete -c my_app -n "__fish_use_subcommand" -f -a "test" -d 'tests things'
6565
complete -c my_app -n "__fish_use_subcommand" -f -a "some_cmd" -d 'tests other things'
66-
complete -c my_app -n "__fish_use_subcommand" -f -a "some-cmd-with-hypens"
66+
complete -c my_app -n "__fish_use_subcommand" -f -a "some-cmd-with-hyphens"
6767
complete -c my_app -n "__fish_use_subcommand" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
6868
complete -c my_app -n "__fish_seen_subcommand_from test" -l case -d 'the case to test' -r
6969
complete -c my_app -n "__fish_seen_subcommand_from test" -s h -l help -d 'Print help information'
7070
complete -c my_app -n "__fish_seen_subcommand_from test" -s V -l version -d 'Print version information'
7171
complete -c my_app -n "__fish_seen_subcommand_from some_cmd" -l config -d 'the other case to test' -r
7272
complete -c my_app -n "__fish_seen_subcommand_from some_cmd" -s h -l help -d 'Print help information'
7373
complete -c my_app -n "__fish_seen_subcommand_from some_cmd" -s V -l version -d 'Print version information'
74-
complete -c my_app -n "__fish_seen_subcommand_from some-cmd-with-hypens" -s h -l help -d 'Print help information'
75-
complete -c my_app -n "__fish_seen_subcommand_from some-cmd-with-hypens" -s V -l version -d 'Print version information'
74+
complete -c my_app -n "__fish_seen_subcommand_from some-cmd-with-hyphens" -s h -l help -d 'Print help information'
75+
complete -c my_app -n "__fish_seen_subcommand_from some-cmd-with-hyphens" -s V -l version -d 'Print version information'
7676
complete -c my_app -n "__fish_seen_subcommand_from help" -s h -l help -d 'Print help information'
7777
"#;
7878

clap_generate/tests/completions/powershell.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ fn build_app_special_commands() -> App<'static> {
108108
.about("the other case to test"),
109109
),
110110
)
111-
.subcommand(App::new("some-cmd-with-hypens").alias("hyphen"))
111+
.subcommand(App::new("some-cmd-with-hyphens").alias("hyphen"))
112112
}
113113

114114
static POWERSHELL_SPECIAL_CMDS: &str = r#"
@@ -143,7 +143,7 @@ Register-ArgumentCompleter -Native -CommandName 'my_app' -ScriptBlock {
143143
[CompletionResult]::new('--conf', 'conf', [CompletionResultType]::ParameterName, 'some config file')
144144
[CompletionResult]::new('test', 'test', [CompletionResultType]::ParameterValue, 'tests things')
145145
[CompletionResult]::new('some_cmd', 'some_cmd', [CompletionResultType]::ParameterValue, 'tests other things')
146-
[CompletionResult]::new('some-cmd-with-hypens', 'some-cmd-with-hypens', [CompletionResultType]::ParameterValue, 'some-cmd-with-hypens')
146+
[CompletionResult]::new('some-cmd-with-hyphens', 'some-cmd-with-hyphens', [CompletionResultType]::ParameterValue, 'some-cmd-with-hyphens')
147147
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
148148
break
149149
}
@@ -163,7 +163,7 @@ Register-ArgumentCompleter -Native -CommandName 'my_app' -ScriptBlock {
163163
[CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version information')
164164
break
165165
}
166-
'my_app;some-cmd-with-hypens' {
166+
'my_app;some-cmd-with-hyphens' {
167167
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
168168
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
169169
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information')

clap_generate_fig/tests/completions/fig.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn build_app_special_commands() -> App<'static> {
104104
.about("the other case to test"),
105105
),
106106
)
107-
.subcommand(App::new("some-cmd-with-hypens").alias("hyphen"))
107+
.subcommand(App::new("some-cmd-with-hyphens").alias("hyphen"))
108108
}
109109

110110
static FIG_SPECIAL_CMDS: &str = r#"const completion: Fig.Spec = {
@@ -156,7 +156,7 @@ static FIG_SPECIAL_CMDS: &str = r#"const completion: Fig.Spec = {
156156
],
157157
},
158158
{
159-
name: "some-cmd-with-hypens",
159+
name: "some-cmd-with-hyphens",
160160
options: [
161161
{
162162
name: ["-h", "--help"],

clap_up/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn runner() -> Runner {
4242
&[
4343
["DisableHelpFlags", "DisableHelpFlag"],
4444
["DisableVersion", "DisableVersionFlag"],
45-
// @TODO @v3 shoud be removed, not renamed
45+
// @TODO @v3 should be removed, not renamed
4646
["VersionlessSubcommands", "DisableVersionForSubcommands"],
4747
],
4848
)

examples/03_args.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fn main() {
7575
println!("A config file was passed in: {}", config);
7676
}
7777

78-
// Let's print the <INPUT> file the user passed in. We can use .unwrap() here becase the arg is
78+
// Let's print the <INPUT> file the user passed in. We can use .unwrap() here because the arg is
7979
// required, and parsing would have failed if the user forgot it
8080
println!("Using input file: {}", matches.value_of("input").unwrap());
8181

examples/10_default_values.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn main() {
2222
// Next we'll use the Option::unwrap_or method on this "CONFIG" option
2323
.arg(
2424
Arg::new("CONFIG")
25-
// Note that we have to manaully include some verbage to the user
25+
// Note that we have to manually include some verbage to the user
2626
// telling them what the default will be.
2727
.about("The config file to use (default is \"config.json\")")
2828
.short('c')

src/build/arg/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2032,7 +2032,7 @@ impl<'help> Arg<'help> {
20322032
///
20332033
/// **NOTE:** This setting only applies to [options] and [positional arguments]
20342034
///
2035-
/// **NOTE:** You can use both strings directly or use [`ArgValue`] if you want more controll
2035+
/// **NOTE:** You can use both strings directly or use [`ArgValue`] if you want more control
20362036
/// over single possible values.
20372037
///
20382038
/// # Examples
@@ -3739,7 +3739,7 @@ impl<'help> Arg<'help> {
37393739
/// # ;
37403740
/// ```
37413741
///
3742-
/// For example, assume an appliction with two subcommands, and you'd like to define a
3742+
/// For example, assume an application with two subcommands, and you'd like to define a
37433743
/// `--verbose` flag that can be called on any of the subcommands and parent, but you don't
37443744
/// want to clutter the source with three duplicate [`Arg`] definitions.
37453745
///

src/build/arg/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::{settings::ArgSettings, Arg};
22

33
#[test]
4-
fn short_flag_misspel() {
4+
fn short_flag_misspell() {
55
let a = Arg::from("-f1, --flag 'some flag'");
66
assert_eq!(a.name, "flag");
77
assert_eq!(a.short.unwrap(), 'f');

src/output/usage.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ impl<'help, 'app, 'parser> Usage<'help, 'app, 'parser> {
6666
usage.push_str(" [OPTIONS]");
6767
}
6868

69-
let allow_mising_positional = self.p.app.is_set(AS::AllowMissingPositional);
70-
if !allow_mising_positional {
69+
let allow_missing_positional = self.p.app.is_set(AS::AllowMissingPositional);
70+
if !allow_missing_positional {
7171
usage.push_str(&req_string);
7272
}
7373

@@ -135,7 +135,7 @@ impl<'help, 'app, 'parser> Usage<'help, 'app, 'parser> {
135135
}
136136
}
137137

138-
if allow_mising_positional {
138+
if allow_missing_positional {
139139
usage.push_str(&req_string);
140140
}
141141

src/parse/errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pub enum ErrorKind {
126126
/// ```
127127
EmptyValue,
128128

129-
/// Occurs when the user doesn't use equals for an option that requres equal
129+
/// Occurs when the user doesn't use equals for an option that requires equal
130130
/// sign to provide values.
131131
///
132132
/// ```rust

0 commit comments

Comments
 (0)