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 IndentationWidth not handling element assignment correctly. #976

Merged
merged 2 commits into from
Apr 9, 2014
Merged

Fix IndentationWidth not handling element assignment correctly. #976

merged 2 commits into from
Apr 9, 2014

Conversation

tamird
Copy link
Contributor

@tamird tamird commented Apr 8, 2014

@bbatsov @jonas054 h/t to @ggilder for helping out with this one.

@tamird
Copy link
Contributor Author

tamird commented Apr 8, 2014

found another bug here, going to amend the commits

@tamird
Copy link
Contributor Author

tamird commented Apr 8, 2014

Fixed!

_receiver, method_name = *node
if ELEMENT_SETTERS.include?(method_name)
_receiver, _setter, _key, rhs = *node
elsif method_name.to_s.end_with?('=') # setter
Copy link
Contributor Author

Choose a reason for hiding this comment

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

hm, perhaps this should be more lax. it really should just work for every method call?

@tamird
Copy link
Contributor Author

tamird commented Apr 9, 2014

another h/t to @daicoden for simplifying the logic

@jonas054
Copy link
Collaborator

jonas054 commented Apr 9, 2014

👍 Looks good!

@bbatsov
Copy link
Collaborator

bbatsov commented Apr 9, 2014

👍 Nice work!

bbatsov added a commit that referenced this pull request Apr 9, 2014
Fix `IndentationWidth` not handling element assignment correctly.
@bbatsov bbatsov merged commit 2ea1767 into rubocop:master Apr 9, 2014
@tamird tamird deleted the indentation-width-ref-assignment branch April 9, 2014 05:12
@tamird
Copy link
Contributor Author

tamird commented Apr 9, 2014

Think you could cut a new release with this? Would allow me to roll out a number of new cops to a Very Large Project

@bbatsov
Copy link
Collaborator

bbatsov commented Apr 9, 2014

I have planned a few more things for that particular release, that should hopefully be ready by the beginning of next week. Between releases I simply use gem 'rubocop', github: 'bbatsov/rubocop', guess this is an option for you as well. That's a good way to find regressions/issues early on - by running the development code on various codebases, prior to its release.

@tamird
Copy link
Contributor Author

tamird commented Apr 9, 2014

sounds good, i'll do that for the time being.

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