[QA] Rubocop style checker

Antoine Musso hashar+wmf at free.fr
Wed Oct 15 19:42:27 UTC 2014


Le 15/10/2014 20:27, Matthew Flaschen a écrit :
> It looks like there is a new Ruby style checker called Rubocop.  It is
> running as a non-voting job on Flow (and I assume other repositories).
> 
> If this is considered ready to run, please document this at
> https://www.mediawiki.org/wiki/Manual:Coding_conventions/Ruby .
>
> Otherwise, people see mysterious FAILURE messages on all their
> changesets without knowing what style guide or tool they're supposed to
> work from.
> 
> It's also currently failing completely
> (https://integration.wikimedia.org/ci/job/mwext-Flow-bundle-rubocop/33/console):
> 
> 
> 18:13:53 bundler: command not found: rubocop
> 18:13:53 Install missing gem executables with `bundle install`
> 
> It seem like there is an issue with the configuration.
> 
> Matt Flaschen

Hello,

Yeah that is definitely a work in progress.  A bunch of repositories had
a new job added which basically runs:

 bundle install
 bundle exec rubocop

Obviously, if the rubocop gem is not specified in the Gemfile, the
command is not going to be found.

For demo purposes, I have added rubocop to the Flow gemfile and that ran
the lint:

https://gerrit.wikimedia.org/r/#/c/166802/
https://integration.wikimedia.org/ci/job/mwext-Flow-bundle-rubocop/47/consoleFull


As Dan pointed in another reply of this thread, no code convention have
been agreed upon yet.

It is probably better to stop triggering those jobs on all patches
proposals and use the 'experimental' pipeline in Zuul ie patch is
triggered on demand when people comment 'check experimental').

Being done with: https://gerrit.wikimedia.org/r/166805


-- 
Antoine "hashar" Musso




More information about the QA mailing list