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

Allow lowercase enum values #660

Merged
merged 1 commit into from
May 11, 2016
Merged

Conversation

koke
Copy link
Contributor

@koke koke commented May 10, 2016

The Swift API Design Guidelines states that:

Names of types and protocols are UpperCamelCase. Everything else is
lowerCamelCase.

https://swift.org/documentation/api-design-guidelines/#follow-case-conventions

This PR changes type_name so it doesn't force enum values to UpperCamelCase.

The Swift API Design Guidelines states that:

> Names of types and protocols are UpperCamelCase. Everything else is
> lowerCamelCase.

https://swift.org/documentation/api-design-guidelines/#follow-case-conventions

This PR changes `type_name` so it doesn't force enum values to UpperCamelCase.
@jpsim
Copy link
Collaborator

jpsim commented May 11, 2016

Actually I think the new Swift convention is to essentially enforce lowerCamelCase for enum elements, so I think we can be even stricter? For now, I think this is fine as a transition period. Thanks!

@jpsim jpsim merged commit ef48703 into realm:master May 11, 2016
@koke
Copy link
Contributor Author

koke commented May 11, 2016

Yes, I created #663 to enforce lowerCamelCase for all identifiers

@koke koke deleted the lowercase-enum-values branch May 11, 2016 09:06
NachoSoto added a commit to NachoSoto/SwiftLint that referenced this pull request Jan 4, 2017
…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.
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

Successfully merging this pull request may close these issues.

2 participants