-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Validate explicit ACL modifiers for top-level declarations #58
Comments
It looks like there's no difference to sourcekit whether or not internal is specified. Using sourcekitten's structure the only difference between: class Foo {} And: internal class Foo {} Is the offset. This would have to be handled by examining the file as well. |
@keith examining the contents of the declaration would probably suffice for this? |
It seems like the class declaration key's offset starts after the modifiers. So in the second example from above the offset is 9. This could cause issue for cases like: internal final class Foo {} Or something crazier like: internal
class Foo {} |
Here's a rough algorithm to do this:
|
Could this be enhanced to include all declarations, and not just top-level ones? |
Top-level declarations should use explicit ACL keywords (
public
,internal
,private
).The text was updated successfully, but these errors were encountered: