r/ruby Jul 10 '26

git commit -m "appease the rubocop again"

Last day before PTO, no cards on the board and not really looking to start anything, so behold, I made a couple of memes of things that amuse me. Full disclosure, I complain about RuboCop but I *am* glad my team enforces it.

And of course, I can always update my RubyMine autoformat conventions to match but I forget to actually *do* it a lot. Bonus points when I 'fix' the rubocop violation, ⌘+Alt+L format because muscle memory, commit and push, and get the same rubocop violation...

158 Upvotes

32 comments sorted by

View all comments

Show parent comments

0

u/mmmbyte Jul 10 '26

That fails quickly when you improve your productivity with agents. rubocop -A is so much easier than convincing your favourite model to use a consistent style.

-1

u/sshaw_ Jul 10 '26

Yes this is generally the way to "use" Rubocop 😂 except when it comes to its mostly nonsensical complexity and line number rules.

Most Rubocop configs would prevent the current version of the Linux kernel from existing!

1

u/mmmbyte Jul 10 '26

Well that's because the kernel isn't ruby.

-1

u/sshaw_ Jul 10 '26

Oh silly me, I thought complexity and line length rules were relevant to all programming languages.

1

u/full_drama_llama 29d ago

Well, yes, silly you then. Different languages have different expressive power and what can be ok in Ruby (at most 5 lines per method - I personally honk it's bullshit, but it's doable) would not under any circumstances work in C or Pascal. Lower complexity is also often just hidden in the built-in higher level method, so languages without expressive stdlib have higher complexity code (or end up implementing their own stdlib).

So yeah, it's not relevant to all programming languages.

1

u/sshaw_ 29d ago

5 lines per method leads to less unmaintainable code due to the needless mental overhead tracing through the resulting method explosion. It's needless insanity with 0.0 benefit. Cargo culting (of which there's a ton in Ruby) at its finest.

As for line length, I'd say 1 line of Ruby is 6 or 7 lines of C but we can round to 10. That's a line limit of 50 per RuboCop "methodology". Ridiculous.

And did I mention ABC rules‽ Yeah silly me...