A similar case to #781 which would basically treat fileprivate and private the same. The reason I would like this is because I like to put logic inside extensions to my class to keep things organized and leaving them as private doesn't allow them to be accessible in an extension even if its defined in the same file.
I wonder if we could do that via a Rule Configuration (instead of allowing both private and fileprivate in the rule for everybody)?
This way in your .swftlint.yml
you could do whatever you prefer, with something like this:
iboutlet_access:
scopes: [private, fileprivate]
If we go that route, we might as well accept people to configure it for internal (or even public?), So we might as well consider renaming the rule to iboutlet_access_scope
or something similar
any update on this? i'm happy to work on it, but would be inclined to keep it simple to begin with and just make the change as per the OP.
of course i agree @AliSoftware is a more long term solution. (although now i think about it, public
is probably even more useful than internal
in terms of outlets. separation of concerns would suggest you'd keep all outlets private
or fileprivate
unless you're making some kind of generic, reusable user interface component that can be used across projects, where each project would hook up the outlet in a custom IB file). in which case you'd be building a framework and want your outlet public
.)
anyone already working on it?
I won't be working on it anytime soon at least (I have already to much work on other OSS projects including mine 馃槣) so feel free to start this one up!
This was resolved on #905. Feel free to open a new issue/PR to address the configuration stuff!
Most helpful comment
I wonder if we could do that via a Rule Configuration (instead of allowing both private and fileprivate in the rule for everybody)?
This way in your
.swftlint.yml
you could do whatever you prefer, with something like this:If we go that route, we might as well accept people to configure it for internal (or even public?), So we might as well consider renaming the rule to
iboutlet_access_scope
or something similar