SwiftFormat adds space between Optional.some and value if used in @Test arguments (to force type detection in the macro). But it starts happening from second test. Artificial example:
Original code
@Test(arguments: [String?.some("input")])
func first_test(input: String?) {
#expect(input == "input")
}
@Test(arguments: [String?.some("input")])
func other_test(input: String?) {
#expect(input == "input")
}
Lint detects an error at line 6
SpaceAroundParens.swift:6:1: error: (spaceAroundParens) Add or remove space around parentheses.
And when format is applied, the result:
@Test(arguments: [String?.some("input")])
func first_test(input: String?) {
#expect(input == "input")
}
@Test(arguments: [String?.some ("input")])
func other_test(input: String?) {
#expect(input == "input")
}
It inserts space between some and ("input"), but only for second (and following) tests.
Environment:
SwiftFormat 0.61.1
macOS 26.4.1
swift
swift-driver version: 1.148.6 Apple Swift version 6.3.1 (swiftlang-6.3.1.1.2 clang-2100.0.123.102)
Target: arm64-apple-macosx26.0
SwiftFormat adds space between
Optional.someand value if used in@Testarguments (to force type detection in the macro). But it starts happening from second test. Artificial example:Original code
Lint detects an error at line 6
SpaceAroundParens.swift:6:1: error: (spaceAroundParens) Add or remove space around parentheses.And when format is applied, the result:
It inserts space between
someand("input"), but only for second (and following) tests.Environment:
SwiftFormat 0.61.1
macOS 26.4.1
swift