-
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
identifier_name issue didn't show warning #4767
Comments
The trigger for this exception was #541 implemented in #1444. However, I cannot find the reason for it. The style guides I've scrolled through don't mention special rules for immutable constants. The rule has been like that for a long time now. That's why I'd rather avoid to change its behavior. The exception for static variables is there but can be disabled by a configuration option. So if you don't like it, just deactivate this exception. 😉 Yet, you are right that there is an inconsistency in the rule's description and its behavior in that the exception is only valid for immutable static variables while the implementation checks all static variables no matter if they are constants or not. Again, to avoid bahavioral changes, we should go and fix the description only. |
#4784 should resolve this. Somewhat tangential to the original complaint, it does seem a bit weird that
(or it's e.g. |
Which option is this? Am I missing something? I don't see it in https://realm.github.io/SwiftLint/identifier_name.html |
Well, the case check can be disabled using |
New Issue Checklist
Describe the bug
In an exception to the above, variable names may start with a capital letter when they are declared static and immutable.
Above is the sentence on SwiftLint Rules, I found out that when I declared
static var AbCvar = 0
, and Xcode didn't show the warning because I realize the rule mention static and immutable. What is the reason ?Environment
swiftlint version
to be sure)? 0.50.3The text was updated successfully, but these errors were encountered: