The linter file that doesn't lead junior developers to bad habits.
Read .rubocop.yml for details.
-
Add Rubocop to your
Gemfile
group :development, :test do gem "rubocop", "1.20" end
-
Run
bundle install
-
Copy the ScaffoLint config file to your project
; curl -o .rubocop.yml https://raw.githubusercontent.com/makersacademy/scaffolint/v2.2.0/.rubocop-stub.yml
Or, if you already have a Rubocop config file, add the relevant lines from the stub file.
-
Gitignore the cached Rubocop file
# File: .gitignore
# Local cache of Rubocop remote config
.rubocop-*
- Run
rubocop
We recommend installing Rubocop support for your editor to get fast feedback as you write your code:
- Visual Studio Code: ruby-rubocop extension
- Atom: linter-rubocop package