Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Sources/Commands/PackageCommands/APIDiff.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import Workspace
struct DeprecatedAPIDiff: ParsableCommand {
static let configuration = CommandConfiguration(commandName: "experimental-api-diff",
abstract: "Deprecated - use `swift package diagnose-api-breaking-changes` instead",
shouldDisplay: false)
shouldDisplay: false,
helpNames: [.short, .long, .customLong("help", withSingleDash: true)])

@Argument(parsing: .captureForPassthrough)
var args: [String] = []
Expand All @@ -49,7 +50,9 @@ struct APIDiff: AsyncSwiftCommand {
behavior may be undesirable as the comparison can be slow. \
The `--products` and `--targets` options may be used to restrict the scope of \
the comparison.
""")
""",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down
3 changes: 2 additions & 1 deletion Sources/Commands/PackageCommands/AddDependency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import class PackageModel.Manifest
extension SwiftPackageCommand {
struct AddDependency: SwiftCommand {
package static let configuration = CommandConfiguration(
abstract: "Add a package dependency to the manifest."
abstract: "Add a package dependency to the manifest.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@Argument(help: "The URL or directory of the package to add.")
Expand Down
4 changes: 3 additions & 1 deletion Sources/Commands/PackageCommands/AddProduct.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ extension SwiftPackageCommand {
}

package static let configuration = CommandConfiguration(
abstract: "Add a new product to the manifest.")
abstract: "Add a new product to the manifest.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down
3 changes: 2 additions & 1 deletion Sources/Commands/PackageCommands/AddSetting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ extension SwiftPackageCommand {
}

package static let configuration = CommandConfiguration(
abstract: "Add a new setting to the manifest."
abstract: "Add a new setting to the manifest.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
Expand Down
3 changes: 2 additions & 1 deletion Sources/Commands/PackageCommands/AddTarget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ extension SwiftPackageCommand {
}

package static let configuration = CommandConfiguration(
abstract: "Add a new target to the manifest."
abstract: "Add a new target to the manifest.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ import Workspace
extension SwiftPackageCommand {
struct AddTargetDependency: SwiftCommand {
package static let configuration = CommandConfiguration(
abstract: "Add a new target dependency to the manifest.")
abstract: "Add a new target dependency to the manifest.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down
3 changes: 2 additions & 1 deletion Sources/Commands/PackageCommands/ArchiveSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ extension SwiftPackageCommand {
struct ArchiveSource: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
commandName: "archive-source",
abstract: "Create a source archive for the package."
abstract: "Create a source archive for the package.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import struct TSCBasic.StringError
struct AuditBinaryArtifact: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
commandName: "experimental-audit-binary-artifact",
abstract: "Audit a static library binary artifact for undefined symbols."
abstract: "Audit a static library binary artifact for undefined symbols.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
Expand Down
5 changes: 3 additions & 2 deletions Sources/Commands/PackageCommands/CompletionCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ extension SwiftPackageCommand {
struct CompletionCommand: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
commandName: "completion-tool",
abstract: "Command to generate shell completions."
abstract: "Command to generate shell completions.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

enum Mode: String, CaseIterable, ExpressibleByArgument {
Expand Down Expand Up @@ -93,4 +94,4 @@ extension SwiftPackageCommand {
}
}
}
}
}
4 changes: 3 additions & 1 deletion Sources/Commands/PackageCommands/ComputeChecksum.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ import struct TSCBasic.SHA256

struct ComputeChecksum: SwiftCommand {
static let configuration = CommandConfiguration(
abstract: "Compute the checksum for a binary artifact.")
abstract: "Compute the checksum for a binary artifact.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down
3 changes: 2 additions & 1 deletion Sources/Commands/PackageCommands/Config.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ extension SwiftPackageCommand {
struct Config: ParsableCommand {
static let configuration = CommandConfiguration(
abstract: "Manipulate configuration of the package",
subcommands: [SetMirror.self, UnsetMirror.self, GetMirror.self]
subcommands: [SetMirror.self, UnsetMirror.self, GetMirror.self],
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)
}
}
Expand Down
4 changes: 3 additions & 1 deletion Sources/Commands/PackageCommands/Describe.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import struct TSCBasic.StringError
extension SwiftPackageCommand {
struct Describe: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
abstract: "Describe the current package.")
abstract: "Describe the current package.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down
13 changes: 10 additions & 3 deletions Sources/Commands/PackageCommands/DumpCommands.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import XCBuildSupport

struct DumpSymbolGraph: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
abstract: "Dump symbol graphs.")
abstract: "Dump symbol graphs.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)
static let defaultMinimumAccessLevel = SymbolGraphExtract.AccessLevel.public

@OptionGroup(visibility: .hidden)
Expand Down Expand Up @@ -146,7 +148,9 @@ enum ExtensionBlockSymbolBehavior: String, EnumerableFlag {

struct DumpPackage: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
abstract: "Print parsed Package.swift as JSON.")
abstract: "Print parsed Package.swift as JSON.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down Expand Up @@ -174,7 +178,10 @@ struct DumpPackage: AsyncSwiftCommand {

struct DumpPIF: AsyncSwiftCommand {
// hides this command from CLI `--help` output
static let configuration = CommandConfiguration(shouldDisplay: false)
static let configuration = CommandConfiguration(
shouldDisplay: false,
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .private)
var globalOptions: GlobalOptions
Expand Down
8 changes: 6 additions & 2 deletions Sources/Commands/PackageCommands/EditCommands.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ import Workspace
extension SwiftPackageCommand {
struct Edit: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
abstract: "Put a package in editable mode.")
abstract: "Put a package in editable mode.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down Expand Up @@ -53,7 +55,9 @@ extension SwiftPackageCommand {

struct Unedit: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
abstract: "Remove a package from editable mode.")
abstract: "Remove a package from editable mode.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down
4 changes: 3 additions & 1 deletion Sources/Commands/PackageCommands/Format.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import enum TSCUtility.Diagnostics
extension SwiftPackageCommand {
struct Format: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
commandName: "_format", shouldDisplay: false)
commandName: "_format", shouldDisplay: false,
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .private)
var globalOptions: GlobalOptions
Expand Down
4 changes: 3 additions & 1 deletion Sources/Commands/PackageCommands/Init.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import SPMBuildCore
extension SwiftPackageCommand {
struct Init: SwiftCommand {
public static let configuration = CommandConfiguration(
abstract: "Initialize a new package.")
abstract: "Initialize a new package.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down
6 changes: 4 additions & 2 deletions Sources/Commands/PackageCommands/Install.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ extension SwiftPackageCommand {
struct Install: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
commandName: "experimental-install",
abstract: "Offers the ability to install executable products of the current package."
abstract: "Offers the ability to install executable products of the current package.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup()
Expand Down Expand Up @@ -102,7 +103,8 @@ extension SwiftPackageCommand {
struct Uninstall: SwiftCommand {
static let configuration = CommandConfiguration(
commandName: "experimental-uninstall",
abstract: "Offers the ability to uninstall executable products previously installed by `swift package experimental-install`."
abstract: "Offers the ability to uninstall executable products previously installed by `swift package experimental-install`.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup
Expand Down
5 changes: 4 additions & 1 deletion Sources/Commands/PackageCommands/Learn.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ extension SwiftPackageCommand {
@OptionGroup()
var globalOptions: GlobalOptions

static let configuration = CommandConfiguration(abstract: "Learn about Swift and this package.")
static let configuration = CommandConfiguration(
abstract: "Learn about Swift and this package.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

func files(fileSystem: FileSystem, in directory: AbsolutePath, fileExtension: String? = nil) throws -> [AbsolutePath] {
guard fileSystem.isDirectory(directory) else {
Expand Down
3 changes: 2 additions & 1 deletion Sources/Commands/PackageCommands/Migrate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ struct MigrateOptions: ParsableArguments {
extension SwiftPackageCommand {
struct Migrate: AsyncSwiftCommand {
package static let configuration = CommandConfiguration(
abstract: "Migrate a package or its individual targets to use the given set of features."
abstract: "Migrate a package or its individual targets to use the given set of features.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
Expand Down
3 changes: 2 additions & 1 deletion Sources/Commands/PackageCommands/PluginCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ import Workspace
struct PluginCommand: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
commandName: "plugin",
abstract: "Invoke a command plugin or perform other actions on command plugins."
abstract: "Invoke a command plugin or perform other actions on command plugins.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
Expand Down
12 changes: 9 additions & 3 deletions Sources/Commands/PackageCommands/ResetCommands.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ import Workspace
extension SwiftPackageCommand {
struct Clean: SwiftCommand {
static let configuration = CommandConfiguration(
abstract: "Delete build artifacts.")
abstract: "Delete build artifacts.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand All @@ -29,7 +31,9 @@ extension SwiftPackageCommand {

struct PurgeCache: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
abstract: "Purge the global repository cache.")
abstract: "Purge the global repository cache.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand All @@ -41,7 +45,9 @@ extension SwiftPackageCommand {

struct Reset: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
abstract: "Reset the complete cache/build directory.")
abstract: "Reset the complete cache/build directory.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down
9 changes: 7 additions & 2 deletions Sources/Commands/PackageCommands/Resolve.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ extension SwiftPackageCommand {

struct Resolve: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
abstract: "Resolve package dependencies.")
abstract: "Resolve package dependencies.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down Expand Up @@ -66,7 +68,10 @@ extension SwiftPackageCommand {
}

struct Fetch: AsyncSwiftCommand {
static let configuration = CommandConfiguration(shouldDisplay: false)
static let configuration = CommandConfiguration(
shouldDisplay: false,
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .private)
var globalOptions: GlobalOptions
Expand Down
4 changes: 3 additions & 1 deletion Sources/Commands/PackageCommands/ShowDependencies.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import var TSCBasic.stdoutStream
extension SwiftPackageCommand {
struct ShowDependencies: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
abstract: "Print the resolved dependency graph.")
abstract: "Print the resolved dependency graph.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down
4 changes: 3 additions & 1 deletion Sources/Commands/PackageCommands/ShowExecutables.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import Workspace

struct ShowExecutables: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
abstract: "List the available executables from this package.")
abstract: "List the available executables from this package.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down
4 changes: 3 additions & 1 deletion Sources/Commands/PackageCommands/ShowTraits.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import Workspace

struct ShowTraits: AsyncSwiftCommand {
static let configuration = CommandConfiguration(
abstract: "List the available traits for a package.")
abstract: "List the available traits for a package.",
helpNames: [.short, .long, .customLong("help", withSingleDash: true)]
)

@OptionGroup(visibility: .hidden)
var globalOptions: GlobalOptions
Expand Down
Loading