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

Fix #1259 : Enable parenthesizing for andor autocorrect #1261

Merged
merged 1 commit into from
Aug 13, 2014
Merged

Fix #1259 : Enable parenthesizing for andor autocorrect #1261

merged 1 commit into from
Aug 13, 2014

Conversation

vrthra
Copy link
Contributor

@vrthra vrthra commented Aug 11, 2014

This change allows rubocop to parenthesize method calls so that
method a,b or method c can be autocorrected to method(a,b) || method(c)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) when pulling 236f59610d739a47e2916cc7fb54a6f7b2af5b34 on vrthra:fix/1259 into b5ef23a on bbatsov:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) when pulling 0c6ad127dd6c67172cd724a45f3b6c5685c42945 on vrthra:fix/1259 into b5ef23a on bbatsov:master.

@vrthra vrthra changed the title Fix 1259 : Enable parenthesizing for andor autocorrect Fix #1259 : Enable parenthesizing for andor autocorrect Aug 11, 2014
expect(new_source).to eq('method( a,b ) || b')
end

it 'auto-correct "or" with || and dont add extra parenthesis' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be 'auto-corrects "or" with || and doesn't add extra parenthesis'

@bbatsov
Copy link
Collaborator

bbatsov commented Aug 13, 2014

You should also add a changelog entry and rebase on top of the current master branch.

This change allows rubocop to parenthesize method calls so that
`method a,b or method c` can be autocorrected to `method(a,b) || method(c)`
@vrthra
Copy link
Contributor Author

vrthra commented Aug 13, 2014

@bbatsov updated with spelling correction, changelog and others

@bbatsov
Copy link
Collaborator

bbatsov commented Aug 13, 2014

👍

bbatsov added a commit that referenced this pull request Aug 13, 2014
Fix #1259 : Enable parenthesizing for andor autocorrect
@bbatsov bbatsov merged commit 106da8b into rubocop:master Aug 13, 2014
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.

4 participants