-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Fixed rubocop issues, new .rubocop_todo.yml #3255
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
Conversation
- 'app/models/article.rb' | ||
|
||
# Offense count: 2101 | ||
# Offense count: 2415 |
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.
ahhaha this keeps increasing :D
if params[:config] == "all_comments" && current_user_is_author? | ||
@notification_subscription.notifiable.update(receive_notifications: true) | ||
end | ||
@notification_subscription.notifiable.update(receive_notifications: true) if params[:config] == "all_comments" && current_user_is_author? |
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.
I'm not a mega fan of the giant ifs at the end, i think the code was more readable before. I'm thinking we should not enforce this, what do you think?
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.
Agree, I haven't checked the autocorrected stuff properly.
'Content-Type': 'application/json', | ||
}, | ||
body: JSON.stringify({poll_vote: { poll_option_id: optionId } }), | ||
body: JSON.stringify({poll_skip: {poll_id: pollId }}), |
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.
should this be part of this PR? It seems it's changing behavior here
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.
It's poll_skip
and poll_id
in master:
https://github.com/thepracticaldev/dev.to/blob/e46bd26223847e35b9de2cd57380bad12a97286f/app/liquid_tags/poll_tag.rb#L96
I wonder why it shows the changes.
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.
It's weird, have you tried to rebase?
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.
Yep, "up-to-date".
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.
It happened to me once or twice, what I did was to create a new branch, cherry pick the commits from the old one in order and either force push or create a new PR.
I still don't know why :(
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.
BTW the second commit contains the change so cherry picking it won't work e2f6837
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.
Actually, if you look at line 81 red and green - they are identical, and the line 96 red and green - they are identical as well (apart from the indentation).
But the git diff
looks confusing.
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.
Ah, that's confusing.
What type of PR is this? (check all applicable)
Description
.rubocop_todo.yml