
RuboCop 0.80: Ruby static code analyzer and code formatter - tosh
https://docs.rubocop.org/en/stable/
======
StaticRedux
In my opinion RuboCop is too strict. Every code standard analyzer takes some
tweaking to get it set up for a particular project and team standards, but
RuboCop needs changing of a ton of rules to make it even usable in a
reasonable fashion.

I love it because it brings some order to a meta-everything world, but it'd be
nice if it came with a reasonable set of rules by default

~~~
phaedryx
Every RuboCop rule is reasonable. That is, you can look up the reason and see
if you agree or not.

Our team has overridden about a dozen rules (we bumped up line length and
class length), but I find most of the default rules are fine.

Out of curiosity, what rules are unreasonable to you?

~~~
22c
Not every rule has a reason, some of it is just "because style guide" and if
you try to look up the rationale there, you'll find none.

Classic example is Perl style %w(literal arrays) vs ['traditional', 'arrays'].

> Prefer `%w` to the literal array syntax when you need an array of strings

Which was introduced[1] into the style guide nearly 9 years ago with
practically no reasoning. Prefer `%w` because why exactly?

[1] [https://github.com/rubocop-hq/ruby-style-
guide/commit/b27eff...](https://github.com/rubocop-hq/ruby-style-
guide/commit/b27eff1b2ca6ee7502bb0c53afec4f25ae154a19)

~~~
hirundo
I prefer the brackets to parens because it makes it more clear at a glance
that the result is an array.

------
dang
A related thread from 2015:
[https://news.ycombinator.com/item?id=9162711](https://news.ycombinator.com/item?id=9162711)

Since the project hasn't been discussed much on HN, we changed the URL from
[https://github.com/rubocop-
hq/rubocop/releases/tag/v0.80.0](https://github.com/rubocop-
hq/rubocop/releases/tag/v0.80.0) to the project page.

~~~
bozhidar
Thanks, much appreciated! (RuboCop's author here)

------
hestefisk
Takes the prize for best open source project name (and logo). FWIW I was a
huge Robocop fan as a child. It’s filled with fantastic one liners: “Dead or
alive, you are coming with me.” “I’ll buy that for a dollar.” “Serve the
public trust, protect the innocent, uphold the law.” “Who cares if it works or
not? Spare parts for 25 years!”

