[QA] Ruby Coding Conventions and RuboCop (was: Rubocop style checker)

Antoine Musso hashar+wmf at free.fr
Thu Nov 13 15:22:54 UTC 2014


Le 13/11/2014 15:54, Željko Filipin a écrit :
> I think it is the time to make rubocop jobs voting. I did not notice any
> problems. Does anybody disagree?

Reviewing the changes to oojs/ui there were some oddities:

Style/WordArray:
https://gerrit.wikimedia.org/r/#/c/172742/1/bin/testsuitegenerator.rb

In a hash that enforce the use of %w(foo bar) for keys, but apparently
not for values!  That is rather inconsistent.

There is no complains for:

  foo = {
    'key' => ['Foo', 'Bar']
  }

But there is for:

  foo = {
    ['key1', 'key2'] => 'value'
  }


Style/CommentIndentation:

Request indentation to use spaces even when the file is tab indented.
The autocorrect ends up mixing tab and spaces. Examples:

 https://gerrit.wikimedia.org/r/#/c/172738/1/bin/docparser.rb
 https://gerrit.wikimedia.org/r/#/c/172719/3/bin/doccomparer.rb




-- 
Antoine "hashar" Musso




More information about the QA mailing list