-
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
Add uncuddled else support to the statement_position rule #688
Conversation
case Standard = "standard", UncuddledElse = "uncuddled_else" | ||
|
||
init(value: AnyObject) throws { | ||
guard let string = (value as? String)?.lowercaseString else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this init is equivalent:
if let string = (value as? String)?.lowercaseString,
value = StatmentModeConfiguration(rawValue: string) {
self = value
} else {
throw ConfigurationError.UnknownConfiguration
}
Current coverage is 90.00%@@ master #688 diff @@
==========================================
Files 71 72 +1
Lines 2238 2351 +113
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 2016 2116 +100
- Misses 222 235 +13
Partials 0 0
|
On the whole this looks great @ateliercw! I just have a few comments. An entry in the changelog would be good too. |
- renamed "standard" to "default" - Updated formatting per code review - added note to changelog
@jpsim adding the the change log entry made me realize that "default" is a more sensible name than "standard", and I made the other formatting and code tweaks that you requested. |
Really great first contribution, @ateliercw! 👏 |
implements uncuddled else as an option on statement_position including autocorrect, should solve issue #651