Page MenuHomePhabricator

fix problems found by rubocop in mediawiki/ruby/api repo
Closed, ResolvedPublic

Description

  • clone mediawiki/ruby/api repo[1]
  • install rubocop gem[2]
  • run "rubocop --auto-gen-config"
  • commit .rubocop.yml and .rubocop_todo.yml files to the repo
  • push the commit to gerrit (with "git review")
  • create separate commit(s) that solve the problems found by rubocop
  • feel free to group similar or small problems in one commit
  • make sure none of the commits is too big, so reviewers do not have a hard time
  • add me (zfilipin) as a reviewer to every commit that is pushed to gerrit

1: https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/ruby/api
2: https://rubygems.org/gems/rubocop
3: https://github.com/bbatsov/rubocop#automatically-generated-configuration


Version: wmf-deployment
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=69245

Details

Reference
bz70605

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:45 AM
bzimport set Reference to bz70605.
bzimport added a subscriber: Unknown Object (MLST).

gerritadmin wrote:

Change 159630 had a related patch set uploaded by Zfilipin:
Add Rubocop files.

https://gerrit.wikimedia.org/r/159630

Damien, please assign the bug to yourself so other people know you are working on it. That will prevent somebody else working on it and duplicating the effort. Thanks!

gerritadmin wrote:

Change 159630 merged by jenkins-bot:
Add Rubocop files.

https://gerrit.wikimedia.org/r/159630

All patches mentioned in this report were merged or abandoned - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?

I do not think Damien is working on this. Damien, if you are, please assign the bug back to yourself.

What is left to do is either resolving offenses from .rubocop_todo.yml[0] or moving them to .rubocop.yml[1], making it explicit that we do not plan to resolve them in the near future.

0: https://github.com/wikimedia/mediawiki-ruby-api/blob/master/.rubocop_todo.yml
1: https://github.com/wikimedia/mediawiki-ruby-api/blob/master/.rubocop.yml

Hi, I'm interested in picking this up if no one else is working on it.

It is not assigned to anybody, go ahead!

Thanks for your contributions, Stan3!

And I'm just now reading Aklapper's comment and realizing I should have amended the commit messages with the cross-reference...

Željko, aside from my screw up, this went really well. One additional step to add to the workflow when we go to tackle other repos might be to add our base exceptions to .rubocop.yml at the outset. That way, we're less likely to run into false positives.

Thanks Stan3 and dduval!

Stan3, we have plenty of other repositories that need similar cleanup. ;)

https://github.com/wikimedia/mediawiki-selenium#links

zeljkofilipin set Security to None.