Hacker News new | ask | show | jobs
by ninkendo 1616 days ago
I tried rubocop once, 8 years ago or so, and it saw code like this:

    def foo(x)
      self.bar = x
    end
and complained that `self.` should be removed. Somebody ran rubocop with autofix. It changed the code to just `bar = x`, which is not the same thing (it just creates a new variable called bar), and it resulted in some really horrible bugs that made their way to production.

I never used rubocop again.

(I'm really hoping this was just a rubocop bug, and has since been fixed, but it's enough to ruin your trust.)