Unify argument formatting for add setting and migrate #8800
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation:
The inconsistency in argument formatting came up as part of SE-0486 review. This is the first step in a direction to make command formatting more consistent.
swift package migrate
:--targets
to--target
--target
and--to-feature
to accept space separated argument listsswift package -add-setting
:.upToNextOption
formatting. Instead of--swift A=B --swift C=D
switch to--swift A=B C=D
.Modifications:
MigrateOptions
to use.upToNextOption
for targets and features.SwiftPackageCommand
's_swiftSettings
option to use.upToNextOption
Result:
The
swift package migrate
andswift package add-setting
command line is now shorter and has consistent formatting.Resolves: rdar://152687586