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

Add uncuddled else support to the statement_position rule #688

Merged
merged 4 commits into from
Jun 10, 2016
Merged

Add uncuddled else support to the statement_position rule #688

merged 4 commits into from
Jun 10, 2016

Conversation

ateliercw
Copy link

implements uncuddled else as an option on statement_position including autocorrect, should solve issue #651

case Standard = "standard", UncuddledElse = "uncuddled_else"

init(value: AnyObject) throws {
guard let string = (value as? String)?.lowercaseString else {
Copy link
Collaborator

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
}

@codecov-io
Copy link

codecov-io commented Jun 9, 2016

Current coverage is 90.00%

Merging #688 into master will decrease coverage by 0.07%

@@             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          

Powered by Codecov. Last updated by 5641b9f...b2ad5fc

@jpsim
Copy link
Collaborator

jpsim commented Jun 9, 2016

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
@ateliercw
Copy link
Author

@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.

@jpsim
Copy link
Collaborator

jpsim commented Jun 10, 2016

Really great first contribution, @ateliercw! 👏

@jpsim jpsim merged commit 05a7da7 into realm:master Jun 10, 2016
@ateliercw ateliercw deleted the ms-cuddled-else-rule branch June 10, 2016 13:57
jpsim added a commit that referenced this pull request Jun 10, 2016
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.

3 participants