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

Dan Duvall dduvall at wikimedia.org
Thu Nov 13 18:40:52 UTC 2014


Before we make rubocop voting, we need to ensure that all repositories have
a .rubocop.yml that includes our exceptions to the rules.[1] I'd also like
to make some additions and effectively ignore all violations that aren't
apart of the bbatsov style guide (almost everything in `Metrics/*` aside
from `LineLength`).

[1] https://www.mediawiki.org/wiki/Manual:Coding_conventions/Ruby

On Thu, Nov 13, 2014 at 7:22 AM, Antoine Musso <hashar+wmf at free.fr> wrote:

> 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
>
>
> _______________________________________________
> QA mailing list
> QA at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/qa
>



-- 
Dan Duvall
Automation Engineer
Wikimedia Foundation <http://wikimediafoundation.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/qa/attachments/20141113/258d6fd7/attachment.html>


More information about the QA mailing list