@@ -26,11 +26,11 @@ import org.http4s.syntax.literals._
26
26
import org .scalasteward .core .application .Config ._
27
27
import org .scalasteward .core .data .Resolver
28
28
import org .scalasteward .core .git .Author
29
+ import org .scalasteward .core .util .Nel
29
30
import org .scalasteward .core .util .dateTime .renderFiniteDuration
30
31
import org .scalasteward .core .vcs .VCSType
31
32
import org .scalasteward .core .vcs .VCSType .GitHub
32
33
import org .scalasteward .core .vcs .github .GitHubApp
33
-
34
34
import scala .concurrent .duration ._
35
35
36
36
object Cli {
@@ -62,6 +62,8 @@ object Cli {
62
62
Validated .fromEither(VCSType .parse(s)).toValidatedNel
63
63
}
64
64
65
+ private val multiple = " (can be used multiple times)"
66
+
65
67
private val workspace : Opts [File ] =
66
68
option[File ](" workspace" , " Location for cache and temporary files" )
67
69
@@ -124,7 +126,7 @@ object Cli {
124
126
).orFalse
125
127
126
128
private val envVar : Opts [List [EnvVar ]] = {
127
- val help = " Assigns the value to the environment variable name (can be used multiple times) "
129
+ val help = s " Assigns the value to the environment variable name $ multiple"
128
130
options[EnvVar ](" env-var" , help).orEmpty
129
131
}
130
132
@@ -138,13 +140,13 @@ object Cli {
138
140
private val whitelist : Opts [List [String ]] =
139
141
options[String ](
140
142
" whitelist" ,
141
- " Directory white listed for the sandbox (can be used multiple times) "
143
+ s " Directory white listed for the sandbox $ multiple"
142
144
).orEmpty
143
145
144
146
private val readOnly : Opts [List [String ]] =
145
147
options[String ](
146
148
" read-only" ,
147
- " Read only directory for the sandbox (can be used multiple times) "
149
+ s " Read only directory for the sandbox $ multiple"
148
150
).orEmpty
149
151
150
152
private val enableSandbox : Opts [Boolean ] =
@@ -167,7 +169,7 @@ object Cli {
167
169
(envVar, processTimeout, sandboxCfg, maxBufferSize).mapN(ProcessCfg .apply)
168
170
169
171
private val repoConfig : Opts [List [Uri ]] =
170
- options[Uri ](" repo-config" , " Additional repo config file (can be used multiple times) " ).orEmpty
172
+ options[Uri ](" repo-config" , s " Additional repo config file $ multiple" ).orEmpty
171
173
172
174
private val disableDefaultRepoConfig : Opts [Boolean ] =
173
175
flag(" disable-default-repo-config" , " Whether to disable the default repo config file" ).orFalse
@@ -178,7 +180,7 @@ object Cli {
178
180
private val scalafixMigrations : Opts [List [Uri ]] =
179
181
options[Uri ](
180
182
" scalafix-migrations" ,
181
- " Additional scalafix migrations configuration file (can be used multiple times) "
183
+ s " Additional scalafix migrations configuration file $ multiple"
182
184
).orEmpty
183
185
184
186
private val disableDefaultScalafixMigrations : Opts [Boolean ] =
@@ -193,7 +195,7 @@ object Cli {
193
195
private val artifactMigrations : Opts [List [Uri ]] =
194
196
options[Uri ](
195
197
" artifact-migrations" ,
196
- " Additional artifact migration configuration file (can be used multiple times) "
198
+ s " Additional artifact migration configuration file $ multiple"
197
199
).orEmpty
198
200
199
201
private val disableDefaultArtifactMigrations : Opts [Boolean ] =
@@ -251,9 +253,12 @@ object Cli {
251
253
option[FiniteDuration ](" refresh-backoff-period" , help).withDefault(default)
252
254
}
253
255
254
- private val urlCheckerTestUrl : Opts [Uri ] = {
256
+ private val urlCheckerTestUrls : Opts [Nel [ Uri ] ] = {
255
257
val default = uri " https://github.com "
256
- option[Uri ](" url-checker-test-url" , s " default: $default" ).withDefault(default)
258
+ options[Uri ](
259
+ " url-checker-test-url" ,
260
+ s " URL for testing the UrlChecker at start-up $multiple; default: $default"
261
+ ).withDefault(Nel .one(default))
257
262
}
258
263
259
264
private val defaultMavenRepo : Opts [Resolver ] = {
@@ -286,7 +291,7 @@ object Cli {
286
291
bitbucketServerCfg,
287
292
gitLabCfg,
288
293
gitHubApp,
289
- urlCheckerTestUrl ,
294
+ urlCheckerTestUrls ,
290
295
defaultMavenRepo,
291
296
refreshBackoffPeriod
292
297
).mapN(Config .apply)
0 commit comments