-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove extensions from LowerACLThanBodyRule
Because of some oddities in the Swift extension ACL ruless, linting ACL inside extensions isn't trivial because of a few cases: 1. Extensions cannot be open, but members inside them can: ``` open extension Foo { // Not valid open func bar() {} } ``` 2. Extensions cannot have an ACL modifier if they conform to a protocol: ``` public extension Foo: Bar {} // Not valid ``` 3. Extensions that do have an ACL modifier affects the inner body, making changes to this slightly riskier: ``` public extension Foo { func bar() {} // implicitly public } ``` With this change we just sidestep all these problems, and instead opt to only lint non extension types. I think this tradeoff is worth it so that this can be enabled and catch issues in classes/structs/enums
- Loading branch information
Showing
3 changed files
with
19 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters