From a0bbe05031d85b78fe2433719f0ba25e8aef0123 Mon Sep 17 00:00:00 2001 From: Mizuo Nagayama <33952656+ozumin@users.noreply.github.com> Date: Tue, 26 Mar 2024 23:38:28 +0900 Subject: [PATCH 1/2] fix comment for multiElementCollectionTrailingCommas --- Sources/SwiftFormat/API/Configuration.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SwiftFormat/API/Configuration.swift b/Sources/SwiftFormat/API/Configuration.swift index ec7d97679..ab8a3e952 100644 --- a/Sources/SwiftFormat/API/Configuration.swift +++ b/Sources/SwiftFormat/API/Configuration.swift @@ -167,7 +167,7 @@ public struct Configuration: Codable, Equatable { /// /// When `true` (default), the correct form is: /// ```swift - /// let MyCollection = [1, 2,] + /// let MyCollection = [1, 2] /// ... /// let MyCollection = [ /// "a": 1, From 8c4a487f11a89cb2a3e9d0ec1fe9ad5d337b848b Mon Sep 17 00:00:00 2001 From: Mizuo Nagayama <33952656+ozumin@users.noreply.github.com> Date: Tue, 26 Mar 2024 23:50:22 +0900 Subject: [PATCH 2/2] fix method name in CommaTests.swift --- Tests/SwiftFormatTests/PrettyPrint/CommaTests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/SwiftFormatTests/PrettyPrint/CommaTests.swift b/Tests/SwiftFormatTests/PrettyPrint/CommaTests.swift index 24bd0238e..4264370c8 100644 --- a/Tests/SwiftFormatTests/PrettyPrint/CommaTests.swift +++ b/Tests/SwiftFormatTests/PrettyPrint/CommaTests.swift @@ -105,7 +105,7 @@ final class CommaTests: PrettyPrintTestCase { assertPrettyPrintEqual(input: input, expected: expected, linelength: 20, configuration: configuration) } - func testArraySingleLineCommasPresentDisabled() { + func testArraySingleLineCommasPresentEnabled() { let input = """ let MyCollection = [1, 2, 3,] @@ -124,7 +124,7 @@ final class CommaTests: PrettyPrintTestCase { assertPrettyPrintEqual(input: input, expected: expected, linelength: 40, configuration: configuration) } - func testArraySingleLineCommasPresentEnabled() { + func testArraySingleLineCommasPresentDisabled() { let input = """ let MyCollection = [1, 2, 3,]