Skip to content

Commit bb44165

Browse files
committed
Normalize help and abstracts for commands
- Update help content to full sentences with punctuation. - Update command abstracts to full sentences with punctuation.
1 parent ed30461 commit bb44165

34 files changed

+206
-206
lines changed

Sources/Commands/PackageCommands/APIDiff.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct DeprecatedAPIDiff: ParsableCommand {
3838
struct APIDiff: AsyncSwiftCommand {
3939
static let configuration = CommandConfiguration(
4040
commandName: "diagnose-api-breaking-changes",
41-
abstract: "Diagnose API-breaking changes to Swift modules in a package",
41+
abstract: "Diagnose API-breaking changes to Swift modules in a package.",
4242
discussion: """
4343
The diagnose-api-breaking-changes command can be used to compare the Swift API of \
4444
a package to a baseline revision, diagnosing any breaking changes which have \
@@ -59,7 +59,7 @@ struct APIDiff: AsyncSwiftCommand {
5959
""")
6060
var breakageAllowlistPath: AbsolutePath?
6161

62-
@Argument(help: "The baseline treeish to compare to (e.g. a commit hash, branch name, tag, etc.)")
62+
@Argument(help: "The baseline treeish to compare to (for example, a commit hash, branch name, tag, and so on).")
6363
var treeish: String
6464

6565
@Option(parsing: .upToNextOption,

Sources/Commands/PackageCommands/AddDependency.swift

+9-9
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,34 @@ import Workspace
2626
extension SwiftPackageCommand {
2727
struct AddDependency: SwiftCommand {
2828
package static let configuration = CommandConfiguration(
29-
abstract: "Add a package dependency to the manifest"
29+
abstract: "Add a package dependency to the manifest."
3030
)
3131

32-
@Argument(help: "The URL or directory of the package to add")
32+
@Argument(help: "The URL or directory of the package to add.")
3333
var dependency: String
3434

3535
@OptionGroup(visibility: .hidden)
3636
var globalOptions: GlobalOptions
3737

38-
@Option(help: "The exact package version to depend on")
38+
@Option(help: "The exact package version to depend on.")
3939
var exact: Version?
4040

41-
@Option(help: "The specific package revision to depend on")
41+
@Option(help: "The specific package revision to depend on.")
4242
var revision: String?
4343

44-
@Option(help: "The branch of the package to depend on")
44+
@Option(help: "The branch of the package to depend on.")
4545
var branch: String?
4646

47-
@Option(help: "The package version to depend on (up to the next major version)")
47+
@Option(help: "The package version to depend on (up to the next major version).")
4848
var from: Version?
4949

50-
@Option(help: "The package version to depend on (up to the next minor version)")
50+
@Option(help: "The package version to depend on (up to the next minor version).")
5151
var upToNextMinorFrom: Version?
5252

53-
@Option(help: "Specify upper bound on the package version range (exclusive)")
53+
@Option(help: "Specify upper bound on the package version range (exclusive).")
5454
var to: Version?
5555

56-
@Option(help: "Specify dependency type")
56+
@Option(help: "Specify dependency type.")
5757
var type: DependencyType = .url
5858

5959
enum DependencyType: String, Codable, CaseIterable, ExpressibleByArgument {

Sources/Commands/PackageCommands/AddProduct.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ extension SwiftPackageCommand {
3636
}
3737

3838
package static let configuration = CommandConfiguration(
39-
abstract: "Add a new product to the manifest")
39+
abstract: "Add a new product to the manifest.")
4040

4141
@OptionGroup(visibility: .hidden)
4242
var globalOptions: GlobalOptions
4343

44-
@Argument(help: "The name of the new product")
44+
@Argument(help: "The name of the new product.")
4545
var name: String
4646

47-
@Option(help: "The type of target to add")
47+
@Option(help: "The type of target to add.")
4848
var type: CommandProductType = .library
4949

5050
@Option(
5151
parsing: .upToNextOption,
52-
help: "A list of targets that are part of this product"
52+
help: "A list of targets that are part of this product."
5353
)
5454
var targets: [String] = []
5555

Sources/Commands/PackageCommands/AddSetting.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ extension SwiftPackageCommand {
3333
}
3434

3535
package static let configuration = CommandConfiguration(
36-
abstract: "Add a new setting to the manifest"
36+
abstract: "Add a new setting to the manifest."
3737
)
3838

3939
@OptionGroup(visibility: .hidden)
4040
var globalOptions: GlobalOptions
4141

42-
@Option(help: "The target to add the setting to")
42+
@Option(help: "The target to add the setting to.")
4343
var target: String
4444

4545
@Option(
4646
name: .customLong("swift"),
4747
parsing: .unconditionalSingleValue,
48-
help: "The Swift language setting(s) to add. Supported settings: \(SwiftSetting.allCases.map(\.rawValue).joined(separator: ", "))"
48+
help: "The Swift language setting(s) to add. Supported settings: \(SwiftSetting.allCases.map(\.rawValue).joined(separator: ", "))."
4949
)
5050
var _swiftSettings: [String]
5151

Sources/Commands/PackageCommands/AddTarget.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,33 @@ extension SwiftPackageCommand {
3636
}
3737

3838
package static let configuration = CommandConfiguration(
39-
abstract: "Add a new target to the manifest")
39+
abstract: "Add a new target to the manifest.")
4040

4141
@OptionGroup(visibility: .hidden)
4242
var globalOptions: GlobalOptions
4343

44-
@Argument(help: "The name of the new target")
44+
@Argument(help: "The name of the new target.")
4545
var name: String
4646

47-
@Option(help: "The type of target to add")
47+
@Option(help: "The type of target to add.")
4848
var type: TargetType = .library
4949

5050
@Option(
5151
parsing: .upToNextOption,
52-
help: "A list of target dependency names"
52+
help: "A list of target dependency names."
5353
)
5454
var dependencies: [String] = []
5555

56-
@Option(help: "The URL for a remote binary target")
56+
@Option(help: "The URL for a remote binary target.")
5757
var url: String?
5858

59-
@Option(help: "The path to a local binary target")
59+
@Option(help: "The path to a local binary target.")
6060
var path: String?
6161

62-
@Option(help: "The checksum for a remote binary target")
62+
@Option(help: "The checksum for a remote binary target.")
6363
var checksum: String?
6464

65-
@Option(help: "The testing library to use when generating test targets, which can be one of 'xctest', 'swift-testing', or 'none'")
65+
@Option(help: "The testing library to use when generating test targets, which can be one of 'xctest', 'swift-testing', or 'none'.")
6666
var testingLibrary: PackageModelSyntax.AddTarget.TestHarness = .default
6767

6868
func run(_ swiftCommandState: SwiftCommandState) throws {

Sources/Commands/PackageCommands/AddTargetDependency.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ import Workspace
2626
extension SwiftPackageCommand {
2727
struct AddTargetDependency: SwiftCommand {
2828
package static let configuration = CommandConfiguration(
29-
abstract: "Add a new target dependency to the manifest")
29+
abstract: "Add a new target dependency to the manifest.")
3030

3131
@OptionGroup(visibility: .hidden)
3232
var globalOptions: GlobalOptions
3333

34-
@Argument(help: "The name of the new dependency")
34+
@Argument(help: "The name of the new dependency.")
3535
var dependencyName: String
3636

37-
@Argument(help: "The name of the target to update")
37+
@Argument(help: "The name of the target to update.")
3838
var targetName: String
3939

40-
@Option(help: "The package in which the dependency resides")
40+
@Option(help: "The package in which the dependency resides.")
4141
var package: String?
4242

4343
func run(_ swiftCommandState: SwiftCommandState) throws {

Sources/Commands/PackageCommands/ArchiveSource.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ extension SwiftPackageCommand {
2121
struct ArchiveSource: AsyncSwiftCommand {
2222
static let configuration = CommandConfiguration(
2323
commandName: "archive-source",
24-
abstract: "Create a source archive for the package"
24+
abstract: "Create a source archive for the package."
2525
)
2626

2727
@OptionGroup(visibility: .hidden)
2828
var globalOptions: GlobalOptions
2929

3030
@Option(
3131
name: [.short, .long],
32-
help: "The absolute or relative path for the generated source archive"
32+
help: "The absolute or relative path for the generated source archive."
3333
)
3434
var output: AbsolutePath?
3535

Sources/Commands/PackageCommands/CompletionCommand.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extension SwiftPackageCommand {
2222
struct CompletionCommand: AsyncSwiftCommand {
2323
static let configuration = CommandConfiguration(
2424
commandName: "completion-tool",
25-
abstract: "Completion command (for shell completions)"
25+
abstract: "Command to generate shell completions."
2626
)
2727

2828
enum Mode: String, CaseIterable, ExpressibleByArgument {
@@ -52,7 +52,7 @@ extension SwiftPackageCommand {
5252
@OptionGroup(visibility: .hidden)
5353
var globalOptions: GlobalOptions
5454

55-
@Argument(help: "Type of completions to list")
55+
@Argument(help: "Type of completions to list.")
5656
var mode: Mode
5757

5858
func run(_ swiftCommandState: SwiftCommandState) async throws {

Sources/Commands/PackageCommands/ComputeChecksum.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct ComputeChecksum: SwiftCommand {
2424
@OptionGroup(visibility: .hidden)
2525
var globalOptions: GlobalOptions
2626

27-
@Argument(help: "The absolute or relative path to the binary artifact")
27+
@Argument(help: "The absolute or relative path to the binary artifact.")
2828
var path: AbsolutePath
2929

3030
func run(_ swiftCommandState: SwiftCommandState) throws {

Sources/Commands/PackageCommands/Config.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extension SwiftPackageCommand {
3030
extension SwiftPackageCommand.Config {
3131
struct SetMirror: SwiftCommand {
3232
static let configuration = CommandConfiguration(
33-
abstract: "Set a mirror for a dependency"
33+
abstract: "Set a mirror for a dependency."
3434
)
3535

3636
@OptionGroup(visibility: .hidden)
@@ -45,10 +45,10 @@ extension SwiftPackageCommand.Config {
4545
@Option(name: .customLong("mirror-url"), help: .hidden)
4646
var _deprecate_mirrorURL: String?
4747

48-
@Option(help: "The original url or identity")
48+
@Option(help: "The original url or identity.")
4949
var original: String?
5050

51-
@Option(help: "The mirror url or identity")
51+
@Option(help: "The mirror url or identity.")
5252
var mirror: String?
5353

5454
func run(_ swiftCommandState: SwiftCommandState) throws {
@@ -88,7 +88,7 @@ extension SwiftPackageCommand.Config {
8888

8989
struct UnsetMirror: SwiftCommand {
9090
static let configuration = CommandConfiguration(
91-
abstract: "Remove an existing mirror"
91+
abstract: "Remove an existing mirror."
9292
)
9393

9494
@OptionGroup(visibility: .hidden)
@@ -103,10 +103,10 @@ extension SwiftPackageCommand.Config {
103103
@Option(name: .customLong("mirror-url"), help: .hidden)
104104
var _deprecate_mirrorURL: String?
105105

106-
@Option(help: "The original url or identity")
106+
@Option(help: "The original url or identity.")
107107
var original: String?
108108

109-
@Option(help: "The mirror url or identity")
109+
@Option(help: "The mirror url or identity.")
110110
var mirror: String?
111111

112112
func run(_ swiftCommandState: SwiftCommandState) throws {
@@ -143,7 +143,7 @@ extension SwiftPackageCommand.Config {
143143

144144
struct GetMirror: SwiftCommand {
145145
static let configuration = CommandConfiguration(
146-
abstract: "Print mirror configuration for the given package dependency"
146+
abstract: "Print mirror configuration for the given package dependency."
147147
)
148148

149149
@OptionGroup(visibility: .hidden)
@@ -154,7 +154,7 @@ extension SwiftPackageCommand.Config {
154154
@Option(name: .customLong("original-url"), help: .hidden)
155155
var _deprecate_originalURL: String?
156156

157-
@Option(help: "The original url or identity")
157+
@Option(help: "The original url or identity.")
158158
var original: String?
159159

160160
func run(_ swiftCommandState: SwiftCommandState) throws {

Sources/Commands/PackageCommands/Describe.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ import struct TSCBasic.StringError
2323
extension SwiftPackageCommand {
2424
struct Describe: AsyncSwiftCommand {
2525
static let configuration = CommandConfiguration(
26-
abstract: "Describe the current package")
27-
26+
abstract: "Describe the current package.")
27+
2828
@OptionGroup(visibility: .hidden)
2929
var globalOptions: GlobalOptions
3030

31-
@Option(help: "Set the output format")
31+
@Option(help: "Set the output format.")
3232
var type: DescribeMode = .text
3333

3434
func run(_ swiftCommandState: SwiftCommandState) async throws {

Sources/Commands/PackageCommands/DumpCommands.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import XCBuildSupport
2323

2424
struct DumpSymbolGraph: AsyncSwiftCommand {
2525
static let configuration = CommandConfiguration(
26-
abstract: "Dump Symbol Graph")
26+
abstract: "Dump symbol graphs.")
2727
static let defaultMinimumAccessLevel = SymbolGraphExtract.AccessLevel.public
2828

2929
@OptionGroup(visibility: .hidden)
@@ -35,7 +35,7 @@ struct DumpSymbolGraph: AsyncSwiftCommand {
3535
@Flag(help: "Skip members inherited through classes or default implementations.")
3636
var skipSynthesizedMembers = false
3737

38-
@Option(help: "Include symbols with this access level or more. Possible values: \(SymbolGraphExtract.AccessLevel.allValueStrings.joined(separator: " | "))")
38+
@Option(help: "Include symbols with this access level or more. Possible values: \(SymbolGraphExtract.AccessLevel.allValueStrings.joined(separator: " | ")).")
3939
var minimumAccessLevel = defaultMinimumAccessLevel
4040

4141
@Flag(help: "Skip emitting doc comments for members inherited through classes or default implementations.")

Sources/Commands/PackageCommands/EditCommands.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ import Workspace
1919
extension SwiftPackageCommand {
2020
struct Edit: AsyncSwiftCommand {
2121
static let configuration = CommandConfiguration(
22-
abstract: "Put a package in editable mode")
22+
abstract: "Put a package in editable mode.")
2323

2424
@OptionGroup(visibility: .hidden)
2525
var globalOptions: GlobalOptions
2626

27-
@Option(help: "The revision to edit", transform: { Revision(identifier: $0) })
27+
@Option(help: "The revision to edit.", transform: { Revision(identifier: $0) })
2828
var revision: Revision?
2929

30-
@Option(name: .customLong("branch"), help: "The branch to create")
30+
@Option(name: .customLong("branch"), help: "The branch to create.")
3131
var checkoutBranch: String?
3232

33-
@Option(help: "Create or use the checkout at this path")
33+
@Option(help: "Create or use the checkout at this path.")
3434
var path: AbsolutePath?
3535

36-
@Argument(help: "The identity of the package to edit")
36+
@Argument(help: "The identity of the package to edit.")
3737
var packageIdentity: String
3838

3939
func run(_ swiftCommandState: SwiftCommandState) async throws {
@@ -53,16 +53,16 @@ extension SwiftPackageCommand {
5353

5454
struct Unedit: AsyncSwiftCommand {
5555
static let configuration = CommandConfiguration(
56-
abstract: "Remove a package from editable mode")
56+
abstract: "Remove a package from editable mode.")
5757

5858
@OptionGroup(visibility: .hidden)
5959
var globalOptions: GlobalOptions
6060

6161
@Flag(name: .customLong("force"),
62-
help: "Unedit the package even if it has uncommitted and unpushed changes")
62+
help: "Unedit the package even if it has uncommitted and unpushed changes.")
6363
var shouldForceRemove: Bool = false
6464

65-
@Argument(help: "The identity of the package to unedit")
65+
@Argument(help: "The identity of the package to unedit.")
6666
var packageIdentity: String
6767

6868
func run(_ swiftCommandState: SwiftCommandState) async throws {

Sources/Commands/PackageCommands/Format.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extension SwiftPackageCommand {
3131
var globalOptions: GlobalOptions
3232

3333
@Argument(parsing: .captureForPassthrough,
34-
help: "Pass flag through to the swift-format tool")
34+
help: "Pass flag through to the swift-format tool.")
3535
var swiftFormatFlags: [String] = []
3636

3737
func run(_ swiftCommandState: SwiftCommandState) async throws {

Sources/Commands/PackageCommands/Init.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import SPMBuildCore
2323
extension SwiftPackageCommand {
2424
struct Init: SwiftCommand {
2525
public static let configuration = CommandConfiguration(
26-
abstract: "Initialize a new package")
26+
abstract: "Initialize a new package.")
2727

2828
@OptionGroup(visibility: .hidden)
2929
var globalOptions: GlobalOptions
@@ -47,7 +47,7 @@ extension SwiftPackageCommand {
4747
@OptionGroup()
4848
var testLibraryOptions: TestLibraryOptions
4949

50-
@Option(name: .customLong("name"), help: "Provide custom package name")
50+
@Option(name: .customLong("name"), help: "Provide custom package name.")
5151
var packageName: String?
5252

5353
// This command should support creating the supplied --package-path if it isn't created.

Sources/Commands/PackageCommands/Install.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extension SwiftPackageCommand {
3030
@OptionGroup()
3131
var globalOptions: GlobalOptions
3232

33-
@Option(help: "The name of the executable product to install")
33+
@Option(help: "The name of the executable product to install.")
3434
var product: String?
3535

3636
func run(_ commandState: SwiftCommandState) async throws {

0 commit comments

Comments
 (0)