How to Use: rubocop

Install

gem install rubocop

Configure

Create a global .rubocop.yml file in your home directory:

touch ~/.rubocop.yml

And add in any general rules:

---

Layout/HashAlignment:
  EnforcedColonStyle: table

Style/WordArray:
  EnforcedStyle: brackets

Project

Do the same thing as above, but in your project root directory.

NOTE: Do not inherit from global config inside your project, EVER!

Run

Standalone:

rubocop

Or in a project:

bundle exec rubocop