If an extension is marked with an access level attribute and has the @_spi attribute, the NoAccessLevelOnExtensionDeclaration rule should move both attributes to each declaration in the extension.
func testExtensionWithSpiAttribute() {
assertFormatting(
NoAccessLevelOnExtensionDeclaration.self,
input: """
@_spi(Something) public extension Foo {
var bar: String { "" }
}
""",
expected: """
extension Foo {
@_spi(Something) public var bar: String { "" }
}
""",
findings: [
// TODO: Add findings
]
)
}
If an extension is marked with an access level attribute and has the
@_spi
attribute, theNoAccessLevelOnExtensionDeclaration
rule should move both attributes to each declaration in the extension.Originated from: https://github.com/apple/swift-syntax/pull/2602#discussion_r1563091753