Closed
Description
When a using standalone macro with an attribute on it, swift-format wants to remove whitespace around the macro.
The following example assumes the default swift-format configuration. Tested on 509.0.0 and main
.
Input:
@available(iOS 17.0, *)
#Preview("Name") {
EmptyView()
}
Expected output: same as input
Actual output:
Test.swift:1:24: warning: [RemoveLine] remove line break
Test.swift:2:17: warning: [Spacing] remove 1 space
@available(iOS 17.0, *)#Preview("Name"){
EmptyView()
}
Metadata
Metadata
Assignees
Labels
No labels