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

Swiftlint: variable_name_max_length does not work. #69

Open
koogawa opened this issue Feb 14, 2017 · 0 comments
Open

Swiftlint: variable_name_max_length does not work. #69

koogawa opened this issue Feb 14, 2017 · 0 comments

Comments

@koogawa
Copy link

koogawa commented Feb 14, 2017

variable_name_max_length does not work, because this key is not a valid rule identifier.

2017-02-14 22 14 19

In fact, no error is displayed in the following cases.

// No error
//public let longVariableNamelongVariableNamelongVariableNamelongVariableNamelongVariableName = "foo"

Therefore, I tried to edit .swiftlint.yml.

variable_name:
  max_length:
    - 60
    - 70
  min_length:
    - 1

Then, the following errors occurred.

/path/to/das-quadrat-develop /Source/Shared/Endpoints/Users.swift:11:8: error: Variable Name Violation: Variable name should start with a lowercase character: 'UserSelf' (variable_name)

Do you think UserSelf should be userSelf ?

I send pull request if there is no problem.

koogawa@4afe3ca

ref. realm/SwiftLint#541

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

No branches or pull requests

1 participant