@@ -13,7 +13,8 @@ class ParserForMethods[B](val mains: MethodMains[B]) {
13
13
docsOnNewLine : Boolean ,
14
14
customNames : Map [String , String ],
15
15
customDocs : Map [String , String ],
16
- sorted : Boolean ): String = {
16
+ sorted : Boolean
17
+ ): String = {
17
18
helpText(totalWidth, docsOnNewLine, customNames, customDocs, sorted, Util .kebabCaseNameMapper)
18
19
}
19
20
@@ -83,7 +84,7 @@ class ParserForMethods[B](val mains: MethodMains[B]) {
83
84
docsOnNewLine : Boolean ,
84
85
autoPrintHelpAndExit : Option [(Int , PrintStream )],
85
86
customNames : Map [String , String ],
86
- customDocs : Map [String , String ],
87
+ customDocs : Map [String , String ]
87
88
): Any = runOrThrow(
88
89
args,
89
90
allowPositional,
@@ -93,7 +94,7 @@ class ParserForMethods[B](val mains: MethodMains[B]) {
93
94
docsOnNewLine,
94
95
autoPrintHelpAndExit,
95
96
customNames,
96
- customDocs,
97
+ customDocs
97
98
)
98
99
99
100
def runOrThrow (
@@ -140,7 +141,14 @@ class ParserForMethods[B](val mains: MethodMains[B]) {
140
141
): Either [String , Any ] = {
141
142
if (autoPrintHelpAndExit.nonEmpty && args.take(1 ) == Seq (" --help" )) {
142
143
val (exitCode, outputStream) = autoPrintHelpAndExit.get
143
- outputStream.println(helpText(totalWidth, docsOnNewLine, customNames, customDocs, sorted, nameMapper))
144
+ outputStream.println(helpText(
145
+ totalWidth,
146
+ docsOnNewLine,
147
+ customNames,
148
+ customDocs,
149
+ sorted,
150
+ nameMapper
151
+ ))
144
152
Compat .exit(exitCode)
145
153
} else runRaw0(args, allowPositional, allowRepeats, nameMapper) match {
146
154
case Left (err) => Left (Renderer .renderEarlyError(err))
@@ -189,21 +197,19 @@ class ParserForMethods[B](val mains: MethodMains[B]) {
189
197
sorted = false
190
198
)
191
199
192
-
193
-
194
200
@ deprecated(" Binary Compatibility Shim" , " mainargs 0.6.0" )
195
201
def runEither (
196
- args : Seq [String ],
197
- allowPositional : Boolean ,
198
- allowRepeats : Boolean ,
199
- totalWidth : Int ,
200
- printHelpOnExit : Boolean ,
201
- docsOnNewLine : Boolean ,
202
- autoPrintHelpAndExit : Option [(Int , PrintStream )],
203
- customNames : Map [String , String ],
204
- customDocs : Map [String , String ],
205
- sorted : Boolean
206
- ): Either [String , Any ] = runEither(
202
+ args : Seq [String ],
203
+ allowPositional : Boolean ,
204
+ allowRepeats : Boolean ,
205
+ totalWidth : Int ,
206
+ printHelpOnExit : Boolean ,
207
+ docsOnNewLine : Boolean ,
208
+ autoPrintHelpAndExit : Option [(Int , PrintStream )],
209
+ customNames : Map [String , String ],
210
+ customDocs : Map [String , String ],
211
+ sorted : Boolean
212
+ ): Either [String , Any ] = runEither(
207
213
args,
208
214
allowPositional,
209
215
allowRepeats,
@@ -220,9 +226,12 @@ class ParserForMethods[B](val mains: MethodMains[B]) {
220
226
def runRaw (
221
227
args : Seq [String ],
222
228
allowPositional : Boolean ,
223
- allowRepeats : Boolean ,
229
+ allowRepeats : Boolean
224
230
): Result [Any ] = runRaw(
225
- args, allowPositional, allowRepeats, Util .kebabCaseNameMapper
231
+ args,
232
+ allowPositional,
233
+ allowRepeats,
234
+ Util .kebabCaseNameMapper
226
235
)
227
236
def runRaw (
228
237
args : Seq [String ],
@@ -240,7 +249,7 @@ class ParserForMethods[B](val mains: MethodMains[B]) {
240
249
def runRaw0 (
241
250
args : Seq [String ],
242
251
allowPositional : Boolean ,
243
- allowRepeats : Boolean ,
252
+ allowRepeats : Boolean
244
253
): Either [Result .Failure .Early , (MainData [_, B ], Result [Any ])] = runRaw0(
245
254
args,
246
255
allowPositional,
@@ -270,7 +279,9 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any)
270
279
docsOnNewLine : Boolean ,
271
280
customName : String ,
272
281
customDoc : String ,
273
- sorted : Boolean ): String = helpText(totalWidth, docsOnNewLine, customName, customDoc, sorted, Util .kebabCaseNameMapper)
282
+ sorted : Boolean
283
+ ): String =
284
+ helpText(totalWidth, docsOnNewLine, customName, customDoc, sorted, Util .kebabCaseNameMapper)
274
285
275
286
def helpText (
276
287
totalWidth : Int = 100 ,
@@ -312,7 +323,8 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any)
312
323
docsOnNewLine : Boolean ,
313
324
autoPrintHelpAndExit : Option [(Int , PrintStream )],
314
325
customName : String ,
315
- customDoc : String ): T = constructOrExit(
326
+ customDoc : String
327
+ ): T = constructOrExit(
316
328
args,
317
329
allowPositional,
318
330
allowRepeats,
@@ -367,7 +379,7 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any)
367
379
docsOnNewLine : Boolean ,
368
380
autoPrintHelpAndExit : Option [(Int , PrintStream )],
369
381
customName : String ,
370
- customDoc : String ,
382
+ customDoc : String
371
383
): T = constructOrThrow(
372
384
args,
373
385
allowPositional,
@@ -420,7 +432,7 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any)
420
432
autoPrintHelpAndExit : Option [(Int , PrintStream )],
421
433
customName : String ,
422
434
customDoc : String ,
423
- sorted : Boolean ,
435
+ sorted : Boolean
424
436
): Either [String , T ] = constructEither(
425
437
args,
426
438
allowPositional,
@@ -431,7 +443,7 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any)
431
443
autoPrintHelpAndExit,
432
444
customName,
433
445
customDoc,
434
- sorted,
446
+ sorted
435
447
)
436
448
def constructEither (
437
449
args : Seq [String ],
@@ -498,7 +510,7 @@ class ParserForClass[T](val main: MainData[T, Any], val companion: () => Any)
498
510
def constructRaw (
499
511
args : Seq [String ],
500
512
allowPositional : Boolean ,
501
- allowRepeats : Boolean ,
513
+ allowRepeats : Boolean
502
514
): Result [T ] = constructRaw(
503
515
args,
504
516
allowPositional,
0 commit comments