-
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
Harmonize rule extensions #5272
Conversation
Here's an example of your CHANGELOG entry: * Use consistent `internal` visibility for rule extensions.
[SimplyDanny](https://github.com/SimplyDanny)
[#issue_number](https://github.com/realm/SwiftLint/issues/issue_number) note: There are two invisible spaces after the entry's text. Generated by 🚫 Danger |
This allows to reduce existential types later.
7c65f87
to
1ecdc10
Compare
How? On its own, I preferred keeping private implementation details of these rules private and inaccessible to the rest of the module. |
The method that creates the rewriter for a rule func makeRewriter(file: SwiftLintFile) -> (any ViolationsSyntaxRewriter)? returns an existential. If the rewriters are func makeRewriter(file: SwiftLintFile) -> (some Rewriter)? { |
Turns out, the compiler confused me. Visibility can remain |
internal
visibility for rule extensions
This allows to reduce existential types later.