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, 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,]