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

Remove extensions from LowerACLThanBodyRule #2164

Merged
merged 3 commits into from
May 6, 2018
Merged

Remove extensions from LowerACLThanBodyRule #2164

merged 3 commits into from
May 6, 2018

Conversation

keith
Copy link
Collaborator

@keith keith commented Apr 20, 2018

Because of some oddities in the Swift extension ACL rules, 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() {}
}
  1. Extensions cannot have an ACL modifier if they conform to a protocol:
public extension Foo: Bar {} // Not valid
  1. 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

case .fileprivate: return 1
case .internal: return 2
case .public: return 3
case .open: return 4
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change might be a little too weird, in which case I can make this private to LowerACLThanBodyRule. For that use case private == fileprivate

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a public interface, I'm a bit reluctant in changing its meaning. What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this Comparable conformance in my last PR, so I'm assuming this rule is still the only consumer, but I'm definitely happy to move it to be private

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this into this rule's file

@SwiftLintBot
Copy link

SwiftLintBot commented Apr 20, 2018

1 Warning
⚠️ This PR may need tests.
5043 Messages
📖 Linting Aerial with this PR took 0.37s vs 0.35s on master (5% slower)
📖 Linting Alamofire with this PR took 2.91s vs 3.04s on master (4% faster)
📖 Linting Firefox with this PR took 10.98s vs 10.99s on master (0% faster)
📖 Linting Kickstarter with this PR took 15.54s vs 15.62s on master (0% faster)
📖 Linting Moya with this PR took 1.79s vs 1.77s on master (1% slower)
📖 Linting Nimble with this PR took 1.45s vs 1.44s on master (0% slower)
📖 Linting Quick with this PR took 0.47s vs 0.48s on master (2% faster)
📖 Linting Realm with this PR took 3.04s vs 3.01s on master (0% slower)
📖 Linting SourceKitten with this PR took 0.94s vs 0.94s on master (0% slower)
📖 Linting Sourcery with this PR took 4.23s vs 4.27s on master (0% faster)
📖 Linting Swift with this PR took 25.26s vs 25.55s on master (1% faster)
📖 Linting WordPress with this PR took 13.48s vs 13.51s on master (0% faster)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Alamofire.swift:44:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Alamofire.swift:52:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Alamofire.swift:61:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Alamofire.swift:81:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Alamofire.swift:86:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Alamofire.swift:99:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:149:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:156:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:163:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:170:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:177:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:187:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:197:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:208:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:222:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:232:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:242:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:252:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:350:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Notifications.swift:29:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Notifications.swift:48:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:127:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:133:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:161:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:189:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:212:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:238:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:379:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:386:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:416:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:446:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:471:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:499:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:541:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:549:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:557:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Response.swift:565:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Result.swift:79:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Result.swift:94:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Result.swift:125:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Result.swift:142:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Result.swift:169:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Result.swift:191:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Result.swift:214:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Result.swift:236:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Result.swift:256:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Result.swift:269:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Result.swift:282:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Result.swift:295:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Request.swift:244:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Request.swift:267:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:114:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:143:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:182:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:217:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:260:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:277:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:289:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:306:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:329:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:354:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:395:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:410:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:432:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:458:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:484:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:515:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:531:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:552:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:579:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:605:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:636:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:652:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:673:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/ResponseSerialization.swift:700:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Timeline.swift:86:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Timeline.swift:111:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Validation.swift:37:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Validation.swift:160:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Validation.swift:170:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Validation.swift:194:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Validation.swift:208:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Validation.swift:221:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Validation.swift:231:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Validation.swift:246:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Validation.swift:274:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Validation.swift:288:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Validation.swift:312:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:244:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:255:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:294:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:313:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:341:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:372:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:396:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:425:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:436:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:511:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:536:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:553:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:572:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:608:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:630:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:660:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:689:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:697:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:705:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/SessionDelegate.swift:715:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Account/FxAClient10.swift:90:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Account/FxAClient10.swift:530:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Account/FxAClient10.swift:546:10: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Account/SyncAuthState.swift:46:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Client/Frontend/Browser/Punycode.swift:172:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Client/Frontend/Browser/Punycode.swift:187:12: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Client/Frontend/Browser/TabLocationView.swift:435:26: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Client/Frontend/Browser/Tab.swift:497:17: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Client/Frontend/Browser/Tab.swift:534:22: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Client/Frontend/Browser/Tab.swift:547:26: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Client/Frontend/Browser/BrowserViewController.swift:34:17: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Client/Frontend/Browser/BrowserViewController.swift:35:17: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
📖 This PR fixed a violation in Firefox: /Users/distiller/project/osscheck/Firefox/Client/Frontend/Browser/BrowserViewController.swift:36:17: warning: Lower ACL than parent Violation: Ensure definitions have a lower access control level than their enclosing parent (lower_acl_than_parent)
⚠️ Danger found 5043 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 133.

Generated by 🚫 Danger

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
@codecov-io
Copy link

codecov-io commented Apr 20, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@59584f1). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2164   +/-   ##
=========================================
  Coverage          ?   91.75%           
=========================================
  Files             ?      268           
  Lines             ?    13176           
  Branches          ?        0           
=========================================
  Hits              ?    12089           
  Misses            ?     1087           
  Partials          ?        0
Impacted Files Coverage Δ
...wiftLintFramework/Rules/LowerACLThanBodyRule.swift 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59584f1...b881334. Read the comment docs.

keith and others added 2 commits April 25, 2018 23:13
since this was publicly added and is generally useful to consumers of
SwiftLintFramework.
@jpsim
Copy link
Collaborator

jpsim commented May 6, 2018

Thanks @keith. I re-added Comparable conformance to AccessControlLevel though since this was publicly added and is generally useful to consumers of SwiftLintFramework. Kept all your other changes.

@keith
Copy link
Collaborator Author

keith commented May 6, 2018

Sounds good!

@jpsim jpsim merged commit cd7f0c1 into master May 6, 2018
@jpsim jpsim deleted the ks/acl-rule branch May 6, 2018 17:32
@keith
Copy link
Collaborator Author

keith commented May 6, 2018 via email

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

Successfully merging this pull request may close these issues.

5 participants