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

Make TypeNameRule conform to ConfigurableRule #388

Closed
jpsim opened this issue Jan 19, 2016 · 4 comments
Closed

Make TypeNameRule conform to ConfigurableRule #388

jpsim opened this issue Jan 19, 2016 · 4 comments

Comments

@jpsim
Copy link
Collaborator

jpsim commented Jan 19, 2016

All its options are currently hardcoded: https://github.com/realm/SwiftLint/blob/9d138ad691f55fd016f883eb4044649b150582b7/Source/SwiftLintFramework/Rules/TypeNameRule.swift

@scottrhoyt
Copy link
Contributor

I can tackle this if you tell me what you'd like to make configurable. A cursory glance makes the min and max length stand out. There's a part of me that almost feels this should be broken into a length rule and a case rule. Actually 2 length rules if we want to follow the pattern from variable name length rules.

@jpsim
Copy link
Collaborator Author

jpsim commented Jan 19, 2016

Actually 2 length rules if we want to follow the pattern from variable name length rules.

This was done before your dictionary-based configuration efforts. It would make much more sense IMO to have a type_name_length rule be configurable on both min_length and max_length.

@scottrhoyt
Copy link
Contributor

That makes sense and would be more performant.

@scottrhoyt
Copy link
Contributor

I can see a good way to accomplish this (as well as do a conversion for the variable rules). It would involve continuing the work of providing standardization on top of ConfigurableRule. I foresee the creation of standard configuration structs in this process. This would ultimately supersede the work done with ViolationLevelRule.

@scottrhoyt scottrhoyt mentioned this issue Jan 21, 2016
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants