4 ms·
Rubocop is an amazingly powerful tool for refactoring ruby codebases. The ability to add custom linting rules and associated autocorrectors basically makes it a
by WJW 5y ago
Rubocop is an amazingly powerful tool for refactoring ruby codebases. The ability to add custom linting rules and associated autocorrectors basically makes it an AST-level find-and-replace tool.
You do need comprehensive testing of course, but that should be table stakes anyway for any large Rails codebase.
- kayodelycaon 5y agoRubocop is awesome. The amount of configuration allows it to be tailored to a company’s preferred rules. (Rubocop’s defaults do not match the common stylings I see in the Ruby in Rails community.)
- ch4s3 5y agoI really like Rubocop, but it's quite slow and resource intensive. I was trying to set up tooling for someone doing The Odin Project recently and couldn't get Rubocop or Solargraph working in VSCode in their VM, on a pretty high end XPS.
- deleted 5y ago[deleted]
- ckolkey 5y agoThe trick with speeding up rubocop (and most other linters, for that matter) is to run it as a daemon. There's a rubocop daemon gem available. Or with solargraph, rubocop is kept in memory so you only pay the startup cost once. With that setup you can get a lint/fix on save in sub 300ms.
- ch4s3 5y agoI tired that and it was still a little too sluggish to use.