diff --git a/Package.swift b/Package.swift index 0dca27c..ef103c9 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.6 +// swift-tools-version:5.7 // // This source file is part of the Swift.org open source project // diff --git a/Plugins/Swift-DocC Convert/SwiftDocCConvert.swift b/Plugins/Swift-DocC Convert/SwiftDocCConvert.swift index 1320352..4dae8c9 100644 --- a/Plugins/Swift-DocC Convert/SwiftDocCConvert.swift +++ b/Plugins/Swift-DocC Convert/SwiftDocCConvert.swift @@ -108,11 +108,7 @@ import PackagePlugin } let archiveOutputPath = archiveOutputDir(for: target) - let dependencyArchivePaths: [String] = if isCombinedDocumentationEnabled { - task.dependencies.map { archiveOutputDir(for: $0.target) } - } else { - [] - } + let dependencyArchivePaths: [String] = isCombinedDocumentationEnabled ? task.dependencies.map { archiveOutputDir(for: $0.target) } : [] if verbose { print("documentation archive output path: '\(archiveOutputPath)'") diff --git a/Sources/SwiftDocCPluginUtilities/CommandLineArguments/CommandLineArguments.swift b/Sources/SwiftDocCPluginUtilities/CommandLineArguments/CommandLineArguments.swift index 1cc7818..8463ea3 100644 --- a/Sources/SwiftDocCPluginUtilities/CommandLineArguments/CommandLineArguments.swift +++ b/Sources/SwiftDocCPluginUtilities/CommandLineArguments/CommandLineArguments.swift @@ -28,10 +28,10 @@ public struct CommandLineArguments { } /// All remaining (not-yet extracted) options or flags, up to the the first `--` separator (if there is one). - private var remainingOptionsOrFlags: [String].SubSequence + private var remainingOptionsOrFlags: Array.SubSequence /// All literals after the first `--` separator (if there is one). - private var literalValues: [String].SubSequence + private var literalValues: Array.SubSequence // MARK: Extract diff --git a/Sources/SwiftDocCPluginUtilities/HelpInformation.swift b/Sources/SwiftDocCPluginUtilities/HelpInformation.swift index e6dd5a4..56c8f7b 100644 --- a/Sources/SwiftDocCPluginUtilities/HelpInformation.swift +++ b/Sources/SwiftDocCPluginUtilities/HelpInformation.swift @@ -136,15 +136,16 @@ private extension DocumentedFlag { flagListText += " / \(inverseNames.listForHelpDescription)" } - var description = if flagListText.count < 23 { + var description: String + if flagListText.count < 23 { // The flag is short enough to fit the abstract on the same line - """ + description = """ \(flagListText.padding(toLength: 23, withPad: " ", startingAt: 0)) \(abstract) """ } else { // The flag is too long to fit the abstract on the same line - """ + description = """ \(flagListText) \(abstract)