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

[Swift 5.0]: LowerACLThanParentRule is broken #2607

Closed
jpsim opened this Issue Jan 28, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@jpsim
Copy link
Collaborator

jpsim commented Jan 28, 2019

private class Foo { func bar() {} }
                    ^ warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)

It seems like members without an explicit ACL annotation in Swift 5 are incorrectly assumed to be internal. This causes incorrect violations in Swift 5 that aren't present in Swift 4.x.

@jpsim jpsim added the swift-5 label Jan 28, 2019

@jpsim

This comment has been minimized.

Copy link
Collaborator Author

jpsim commented Jan 28, 2019

I filed SR-9777 to track this.

@marcelofabri

This comment has been minimized.

Copy link
Collaborator

marcelofabri commented Jan 28, 2019

We could work around it for this rule in specific and check the annotations instead (as we don't really care about implicit ACLs here).

It'd be great to fix it on SourceKit though to avoid any surprises on other rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.