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

Autocorrect ParenthesesAroundCondition. #614

Merged

Conversation

dblock
Copy link
Contributor

@dblock dblock commented Nov 7, 2013

No description provided.

@@ -22,6 +22,21 @@
'x += 1 until (x < 10)',
])
expect(cop.offences.size).to eq(9)
expect(corrected).to eq ['if x > 10',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned in #612 we prefer to have the auto-correct examples separated from the detection examples.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) when pulling 82aef39655aeddc1becc69400f876d5159e6212e on dblock:autocorrect-parenthesis-around-condition into e4c8a22 on bbatsov:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) when pulling 82aef39655aeddc1becc69400f876d5159e6212e on dblock:autocorrect-parenthesis-around-condition into e4c8a22 on bbatsov:master.

@dblock
Copy link
Contributor Author

dblock commented Nov 7, 2013

This has been updated, test for autocorrection split.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) when pulling 7acb3b9259c4f2b51514bb41eaca3aa61982c307 on dblock:autocorrect-parenthesis-around-condition into e4c8a22 on bbatsov:master.

@@ -41,7 +72,7 @@
expect(cop.offences).to be_empty
end

it 'is not confused by leading brace in subexpression' do
it 'is not confused by leading parentheses in subexpression' do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parentheses -> parenthesis (it's not plural here)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whooops, fixed. English is my 3rd language :)

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) when pulling 3e50f0e8c615d18b9f6c470af2f75db79a92b681 on dblock:autocorrect-parenthesis-around-condition into e4c8a22 on bbatsov:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) when pulling 3e50f0e8c615d18b9f6c470af2f75db79a92b681 on dblock:autocorrect-parenthesis-around-condition into e4c8a22 on bbatsov:master.

@@ -2,6 +2,8 @@

## master (unreleased)

* [#614](https://github.com/bbatsov/rubocop/pull/614): `ParenthesesAroundCondition` cop does auto-correction. ([@dblock][])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll have to rebase because of a conflicting change here in your other PR that I just merged. Btw, add a heading "New features".

@dblock
Copy link
Contributor Author

dblock commented Nov 7, 2013

Rebased, good to merge.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) when pulling bce8ce7 on dblock:autocorrect-parenthesis-around-condition into b62e186 on bbatsov:master.

bbatsov added a commit that referenced this pull request Nov 7, 2013
…ndition

Autocorrect ParenthesesAroundCondition.
@bbatsov bbatsov merged commit aab468d into rubocop:master Nov 7, 2013
@dblock dblock deleted the autocorrect-parenthesis-around-condition branch November 9, 2013 16:19
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