Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoAccessLevelOnExtensionDeclaration should move @_spi attribute with access level attribute #714

Open
Matejkob opened this issue Apr 14, 2024 · 1 comment

Comments

@Matejkob
Copy link
Contributor

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
    ]
  )
}

Originated from: apple/swift-syntax#2602 (comment)

@ahoppen
Copy link
Contributor

ahoppen commented Apr 23, 2024

Tracked in Apple’s issue tracker as rdar://126948454

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants