|
|
|
|
|
by codebeaker
2308 days ago
|
|
I'd say that in our environment we introduced Rubocop into a 4 year old Ruby project that started on Ruby 1.9 and is now on 2.5, our code has a lot of warts. We run rubocop (including a handful of our own custom cops for enforcing US-english spelling, and some specific "remember to use a transaction here") only on changed files (using codeclimate) That means as we gradually touch more and more of our older code, we slowly enforce the styleguide. We don't run a lot of custom configs globally (none, I think) and disable selective overzealous cops on specific lines, or blocks. Some notable annoyances are `def Something()` which is named this way to model it after the coercions in Kernel, which rubocop complains about because of the pascal casing, and a couple of cases of too-long-lines in long, long, long doubles/mocks in rspec specs, which is a separate problem of its own. |
|