OVER TIME AND CODEBASES How do you keep code style consistent? How do you avoid errors and bad code “practices”? How do you ensure that your code complexity remains low? How do you make sure you are not using inefficient or insecure ruby calls? How do you make sure your code is using new features or is ready for new ruby versions?
RUBOCOP IN LESS THAN 5 MINUTES (1/3) In your Gemfile: gem 'rubocop', require: false Then just install it: $ bundle install Also integrates with rake and guard.
Run the auto-config: $ bundle exec rubocop —auto-gen-config Run `rubocop --config .rubocop_todo.yml`, or add `inherit_from: .rubocop_todo.yml` in a .rubocop.yml file. Create and tweak your own rubocop.yml: require: - rubocop-rspec inherit_from: .rubocop_todo.yml [..] RUBOCOP IN LESS THAN 5 MINUTES (2/3)