Skip to content

Commit 74012e2

Browse files
committed
applying formatting using Script/format
1 parent 4af3470 commit 74012e2

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

Sources/ArgumentParserTestHelpers/TestHelpers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ extension XCTest {
530530
} else {
531531
command = [
532532
"generate-docc-reference", commandURL.path,
533-
"--output-directory", "-"
533+
"--output-directory", "-",
534534
]
535535
}
536536
let actual = try AssertExecuteCommand(

Tests/ArgumentParserGenerateDoccReferenceTests/GenerateDoccReferenceTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class GenerateDoccReferenceTests: XCTestCase {
2323
guard #available(macOS 12, *) else { return }
2424
try assertGeneratedReference(command: "count-lines", doccFlavored: true)
2525
}
26-
#endif
26+
#endif
2727

2828
func testColorMarkdownReference() throws {
2929
try assertGeneratedReference(command: "color", doccFlavored: false)
@@ -39,7 +39,6 @@ final class GenerateDoccReferenceTests: XCTestCase {
3939
try assertGeneratedReference(command: "math", doccFlavored: true)
4040
}
4141

42-
4342
func testRepeatMarkdownReference() throws {
4443
try assertGeneratedReference(command: "repeat", doccFlavored: false)
4544
}

Tools/generate-docc-reference/Extensions/ArgumentParser+Markdown.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ extension CommandInfoV0 {
8888
}
8989

9090
for subcommand in self.subcommands ?? [] {
91-
result += subcommand.toMarkdown(path + [self.commandName], doccFlavored: doccFlavored) + "\n\n"
91+
result +=
92+
subcommand.toMarkdown(
93+
path + [self.commandName], doccFlavored: doccFlavored) + "\n\n"
9294
}
9395

9496
return result

Tools/generate-docc-reference/GenerateDoccReference.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct GenerateDoccReference: ParsableCommand {
4949
name: .shortAndLong,
5050
help: "Directory to save generated docc reference. Use '-' for stdout.")
5151
var outputDirectory: String
52-
52+
5353
@Option(
5454
name: .shortAndLong,
5555
help: "Use docc flavored markdown for the generated output.")
@@ -111,7 +111,8 @@ struct GenerateDoccReference: ParsableCommand {
111111

112112
do {
113113
if self.outputDirectory == "-" {
114-
try self.generatePages(from: toolInfo.command, savingTo: nil, doccFlavored: doccFlavored)
114+
try self.generatePages(
115+
from: toolInfo.command, savingTo: nil, doccFlavored: doccFlavored)
115116
} else {
116117
try self.generatePages(
117118
from: toolInfo.command,
@@ -123,13 +124,15 @@ struct GenerateDoccReference: ParsableCommand {
123124
error: error)
124125
}
125126
}
126-
127+
127128
/// Generates a markdown file from the CommandInfoV0 object you provide.
128129
/// - Parameters:
129130
/// - command: The command to parse into a markdown output.
130131
/// - directory: The directory to save the generated markdown file, printing it if `nil`.
131132
/// - doccFlavored: A Boolean value the indicates whether to generate docc-flavored markdown.
132-
func generatePages(from command: CommandInfoV0, savingTo directory: URL?, doccFlavored: Bool)
133+
func generatePages(
134+
from command: CommandInfoV0, savingTo directory: URL?, doccFlavored: Bool
135+
)
133136
throws
134137
{
135138
let page = command.toMarkdown([], doccFlavored: doccFlavored)

0 commit comments

Comments
 (0)