You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Names of types and protocols are UpperCamelCase. Everything else is
lowerCamelCase.
The existing variable_name rule only checks that variables are lowerCamelCase, but other identifiers, like functions or methods aren't checked:
// No error
func Function(param:Int)->Int{return param
}
// error: Variable Name Violation: Variable name should start with a lowercase character: 'Function' (variable_name)
letFunction:Int->Int={ $0 }
I'd propose renaming variable_name to identifier_name and check all the other identifier types as well.
…ase in Swift 3
To my surprise, the `type_name` rule is not currently validating this. I've found some issues referring to this (realm#655, realm#654, realm#663, and the change in realm#660),
but it's not clear to me whether not validating this was on purpose.
The Swift API Design Guidelines state that:
The existing
variable_name
rule only checks that variables are lowerCamelCase, but other identifiers, like functions or methods aren't checked:I'd propose renaming
variable_name
toidentifier_name
and check all the other identifier types as well.Related: #660
The text was updated successfully, but these errors were encountered: