Skip to content

Commit a8776db

Browse files
committed
Fix up formatting
1 parent 932e7a4 commit a8776db

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Sources/SwiftFormat/Core/DocumentationComment.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,7 @@ extension DocumentationComment {
386386
let prefixWidth =
387387
4
388388
+ joiningTrivia.map {
389-
if case .spaces(let n) = $0 { return n }
390-
else { return 0 }
389+
if case .spaces(let n) = $0 { return n } else { return 0 }
391390
}.reduce(0, +)
392391

393392
let options = MarkupFormatter.Options(
@@ -498,6 +497,7 @@ extension DocumentationComment.Parameter {
498497
let label = asSingle ? "Parameter \(name):" : "\(name):"
499498
let summaryWithLabel = summary.prefixed(with: label)
500499
return ListItem(
501-
[summaryWithLabel] + comment.bodyNodes.map { $0 as! BlockMarkup })
500+
[summaryWithLabel] + comment.bodyNodes.map { $0 as! BlockMarkup }
501+
)
502502
}
503503
}

Tests/SwiftFormatTests/Rules/StandardizeDocumentationCommentsTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class StandardizeDocumentationCommentsTests: LintOrFormatRuleTestCase {
156156
configuration: Self.configuration
157157
)
158158
}
159-
159+
160160
func testDetailedParameters() {
161161
assertFormatting(
162162
StandardizeDocumentationComments.self,
@@ -232,9 +232,9 @@ class StandardizeDocumentationCommentsTests: LintOrFormatRuleTestCase {
232232
configuration: Self.configuration
233233
)
234234
}
235-
235+
236236
// MARK: Nominal decl tests
237-
237+
238238
func testActorDecl() {
239239
assertFormatting(
240240
StandardizeDocumentationComments.self,
@@ -255,7 +255,7 @@ class StandardizeDocumentationCommentsTests: LintOrFormatRuleTestCase {
255255
configuration: Self.configuration
256256
)
257257
}
258-
258+
259259
func testAssociatedTypeDecl() {
260260
assertFormatting(
261261
StandardizeDocumentationComments.self,
@@ -276,7 +276,7 @@ class StandardizeDocumentationCommentsTests: LintOrFormatRuleTestCase {
276276
configuration: Self.configuration
277277
)
278278
}
279-
279+
280280
func testClassDecl() {
281281
assertFormatting(
282282
StandardizeDocumentationComments.self,

0 commit comments

Comments
 (0)