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

variable_name should not apply to overriding properties #1169

Closed
u2606 opened this issue Jan 11, 2017 · 0 comments
Closed

variable_name should not apply to overriding properties #1169

u2606 opened this issue Jan 11, 2017 · 0 comments
Labels
enhancement Ideas for improvements of existing features and rules.

Comments

@u2606
Copy link
Contributor

u2606 commented Jan 11, 2017

When I'm overriding a property, I don't have the freedom to change its name. For example, when overriding a UIKit property with a very long name, I can't avoid an error:

class MyViewController: UIViewController {
    override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation {
        return .landscapeLeft
    }
}

Variable Name Violation: Variable name should be between 3 and 40 characters long: 'preferredInterfaceOrientationForPresentation' (variable_name)

It doesn't make sense for SwiftLint to ask me to change the property name. If I did, it wouldn't be overriding the superclass property anymore.

@jpsim jpsim added the enhancement Ideas for improvements of existing features and rules. label Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas for improvements of existing features and rules.
Projects
None yet
Development

No branches or pull requests

2 participants