Skip to content

Commit 385e641

Browse files
committed
!fixup use non-empty aliases
1 parent 92fd145 commit 385e641

8 files changed

Lines changed: 1 addition & 58 deletions

File tree

Sources/ArgumentParserToolInfo/ToolInfo.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public struct CommandInfoV0: Codable, Hashable {
7979
self.shouldDisplay = shouldDisplay
8080

8181
self.commandName = commandName
82-
self.aliases = aliases
82+
self.aliases = aliases?.nonEmpty
8383
self.abstract = abstract.nonEmpty
8484
self.discussion = discussion.nonEmpty
8585

Tests/ArgumentParserUnitTests/Snapshots/testADumpHelp().json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"command" : {
3-
"aliases" : [
4-
5-
],
63
"arguments" : [
74
{
85
"allValues" : [
@@ -182,9 +179,6 @@
182179
"subcommands" : [
183180
{
184181
"abstract" : "Show subcommand help information.",
185-
"aliases" : [
186-
187-
],
188182
"arguments" : [
189183
{
190184
"isOptional" : true,

Tests/ArgumentParserUnitTests/Snapshots/testBDumpHelp().json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"command" : {
3-
"aliases" : [
4-
5-
],
63
"arguments" : [
74
{
85
"isOptional" : true,
@@ -71,9 +68,6 @@
7168
"subcommands" : [
7269
{
7370
"abstract" : "Show subcommand help information.",
74-
"aliases" : [
75-
76-
],
7771
"arguments" : [
7872
{
7973
"isOptional" : true,

Tests/ArgumentParserUnitTests/Snapshots/testCDumpHelp().json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
{
22
"command" : {
3-
"aliases" : [
4-
5-
],
63
"arguments" : [
74
{
85
"abstract" : "A color to select.",
@@ -205,9 +202,6 @@
205202
"subcommands" : [
206203
{
207204
"abstract" : "Show subcommand help information.",
208-
"aliases" : [
209-
210-
],
211205
"arguments" : [
212206
{
213207
"isOptional" : true,

Tests/ArgumentParserUnitTests/Snapshots/testMathAddDumpHelp().json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"command" : {
33
"abstract" : "Print the sum of the values.",
4-
"aliases" : [
5-
6-
],
74
"arguments" : [
85
{
96
"abstract" : "Use hexadecimal notation for the result.",
@@ -85,9 +82,6 @@
8582
"subcommands" : [
8683
{
8784
"abstract" : "Show subcommand help information.",
88-
"aliases" : [
89-
90-
],
9185
"arguments" : [
9286
{
9387
"isOptional" : true,

Tests/ArgumentParserUnitTests/Snapshots/testMathDumpHelp().json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"command" : {
33
"abstract" : "A utility for performing maths.",
4-
"aliases" : [
5-
6-
],
74
"arguments" : [
85
{
96
"abstract" : "Show the version.",
@@ -53,9 +50,6 @@
5350
"subcommands" : [
5451
{
5552
"abstract" : "Print the sum of the values.",
56-
"aliases" : [
57-
58-
],
5953
"arguments" : [
6054
{
6155
"abstract" : "Use hexadecimal notation for the result.",
@@ -227,9 +221,6 @@
227221
},
228222
{
229223
"abstract" : "Calculate descriptive statistics.",
230-
"aliases" : [
231-
232-
],
233224
"arguments" : [
234225
{
235226
"abstract" : "Show the version.",
@@ -378,9 +369,6 @@
378369
},
379370
{
380371
"abstract" : "Print the standard deviation of the values.",
381-
"aliases" : [
382-
383-
],
384372
"arguments" : [
385373
{
386374
"abstract" : "A group of floating-point values to operate on.",
@@ -443,9 +431,6 @@
443431
},
444432
{
445433
"abstract" : "Print the quantiles of the values (TBD).",
446-
"aliases" : [
447-
448-
],
449434
"arguments" : [
450435
{
451436
"completionKind" : {
@@ -747,9 +732,6 @@
747732
},
748733
{
749734
"abstract" : "Show subcommand help information.",
750-
"aliases" : [
751-
752-
],
753735
"arguments" : [
754736
{
755737
"isOptional" : true,

Tests/ArgumentParserUnitTests/Snapshots/testMathMultiplyDumpHelp().json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@
8585
"subcommands" : [
8686
{
8787
"abstract" : "Show subcommand help information.",
88-
"aliases" : [
89-
90-
],
9188
"arguments" : [
9289
{
9390
"isOptional" : true,

Tests/ArgumentParserUnitTests/Snapshots/testMathStatsDumpHelp().json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"command" : {
33
"abstract" : "Calculate descriptive statistics.",
4-
"aliases" : [
5-
6-
],
74
"arguments" : [
85
{
96
"abstract" : "Show the version.",
@@ -152,9 +149,6 @@
152149
},
153150
{
154151
"abstract" : "Print the standard deviation of the values.",
155-
"aliases" : [
156-
157-
],
158152
"arguments" : [
159153
{
160154
"abstract" : "A group of floating-point values to operate on.",
@@ -217,9 +211,6 @@
217211
},
218212
{
219213
"abstract" : "Print the quantiles of the values (TBD).",
220-
"aliases" : [
221-
222-
],
223214
"arguments" : [
224215
{
225216
"completionKind" : {
@@ -516,9 +507,6 @@
516507
},
517508
{
518509
"abstract" : "Show subcommand help information.",
519-
"aliases" : [
520-
521-
],
522510
"arguments" : [
523511
{
524512
"isOptional" : true,

0 commit comments

Comments
 (0)