-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Implement autocorrection for Rails/ReadWriteAttribute cop. #1539
Implement autocorrection for Rails/ReadWriteAttribute cop. #1539
Conversation
The travis failure seems to be because of the merge of #1538: https://travis-ci.org/bbatsov/rubocop/builds/45374765 |
end | ||
end | ||
|
||
def autocorrect_read(node) |
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.
autocorrect_read
and autocorrect_write
should be private.
13eab86
to
667c463
Compare
@jonas054 thank you for the code review, appreciated! I've changed the code accordingly and rebased on current master. I've created independent commits for the issues you mentioned. Should I squash them again? |
The code looks good to me now apart from the missing explicit receiver in the specs that I mentioned, so please make that change and squash again. Maybe @bbatsov has some more comments. |
667c463
to
9ef1b40
Compare
Squashed the autocorrection commits and added explicit specs. |
Doesn't look squashed to me. |
I've squashed the follow up fixes into the main autocorrection changes. I decidedly let it be 4 commits who each have some other context/target. Didn't want to have additional specs of current behavior and new functionality in the same commit;-) But I can squash it all together, as you like? |
@huerlisi The first 3 commits seem like a single task to me - I'd normally have them as a single commit. I'm a believer that related changes should live in a single commit. |
9ef1b40
to
2498982
Compare
Sure, makes sense. Squashed as requested. |
Thanks! 👍 |
…ttribute Implement autocorrection for Rails/ReadWriteAttribute cop.
This implements autocorrection for the Rails/ReadWriteAttribute cop.
It is my first contribution to rubocop, therefore I'm not sure it fits your coding conventions;-)