<div dir="ltr">I've added some more exceptions to our guide if anyone has an opinion on them.[1] (Željko beat me to the `ClassLength` exclusion.)<div><br></div><div>In general, I think these metric rules are overzealous (aside from line length). Can you really quantify the quality of a class/method by measuring the number of lines it has? Maybe by its max number of operations (`O(...)`), but that's still impossible enough to leave up to the good faith of the developer.</div><div><br></div><div>IMO, we shouldn't make rubocop voting until we iron out all the overzealousness of RuboCop. I've submitted a pull request to help us create base configuration that's more congruent with the actual style guide.[2] Ironically enough, it has failed the Travis CI check because of an overzealous `GuardClause` check. (Seriously, who can't read an `if` statement ... :)</div><div><br><div>[1] <a href="https://www.mediawiki.org/w/index.php?title=Manual%3ACoding_conventions%2FRuby&diff=1272349&oldid=1247792">https://www.mediawiki.org/w/index.php?title=Manual%3ACoding_conventions%2FRuby&diff=1272349&oldid=1247792</a></div><div>[2] <a href="https://github.com/bbatsov/rubocop/pull/1454">https://github.com/bbatsov/rubocop/pull/1454</a></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 13, 2014 at 10:40 AM, Dan Duvall <span dir="ltr"><<a href="mailto:dduvall@wikimedia.org" target="_blank">dduvall@wikimedia.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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`).<div><br></div><div>[1] <a href="https://www.mediawiki.org/wiki/Manual:Coding_conventions/Ruby" target="_blank">https://www.mediawiki.org/wiki/Manual:Coding_conventions/Ruby</a></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Thu, Nov 13, 2014 at 7:22 AM, Antoine Musso <span dir="ltr"><<a href="mailto:hashar+wmf@free.fr" target="_blank">hashar+wmf@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le 13/11/2014 15:54, Željko Filipin a écrit :<br>
<span>> I think it is the time to make rubocop jobs voting. I did not notice any<br>
> problems. Does anybody disagree?<br>
<br>
</span>Reviewing the changes to oojs/ui there were some oddities:<br>
<br>
Style/WordArray:<br>
<a href="https://gerrit.wikimedia.org/r/#/c/172742/1/bin/testsuitegenerator.rb" target="_blank">https://gerrit.wikimedia.org/r/#/c/172742/1/bin/testsuitegenerator.rb</a><br>
<br>
In a hash that enforce the use of %w(foo bar) for keys, but apparently<br>
not for values!  That is rather inconsistent.<br>
<br>
There is no complains for:<br>
<br>
  foo = {<br>
    'key' => ['Foo', 'Bar']<br>
  }<br>
<br>
But there is for:<br>
<br>
  foo = {<br>
    ['key1', 'key2'] => 'value'<br>
  }<br>
<br>
<br>
Style/CommentIndentation:<br>
<br>
Request indentation to use spaces even when the file is tab indented.<br>
The autocorrect ends up mixing tab and spaces. Examples:<br>
<br>
 <a href="https://gerrit.wikimedia.org/r/#/c/172738/1/bin/docparser.rb" target="_blank">https://gerrit.wikimedia.org/r/#/c/172738/1/bin/docparser.rb</a><br>
 <a href="https://gerrit.wikimedia.org/r/#/c/172719/3/bin/doccomparer.rb" target="_blank">https://gerrit.wikimedia.org/r/#/c/172719/3/bin/doccomparer.rb</a><br>
<span><font color="#888888"><br>
<br>
<br>
<br>
--<br>
Antoine "hashar" Musso<br>
</font></span><div><div><br>
<br>
_______________________________________________<br>
QA mailing list<br>
<a href="mailto:QA@lists.wikimedia.org" target="_blank">QA@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/qa" target="_blank">https://lists.wikimedia.org/mailman/listinfo/qa</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="">-- <br><div><div dir="ltr">Dan Duvall<div>Automation Engineer</div><div><a href="http://wikimediafoundation.org" target="_blank">Wikimedia Foundation</a><br></div></div></div>
</span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Dan Duvall<div>Automation Engineer</div><div><a href="http://wikimediafoundation.org" target="_blank">Wikimedia Foundation</a><br></div></div></div>
</div>