Help us understand the problem. What is going on with this article?

rubocop−airbnbを使うにあたって 

More than 1 year has passed since last update.

rubocopとは

Ruby style guideを基づいて作られたstatic code analyzerです。
gitはこちら

rubocop−airbnbとは

airbnb社が作っているrubocopです。
gitはこちら

導入

Gemfileに以下のgemを追加しましょう。

group :development, :test do
  gem 'rubocop-airbnb'

追加しましたら、bundle installを実行しましょう。

設定

アプリのフォルダに.rubocop.ymlと.rubocop_airbnb.ymlファイルを作成し、以下の内容を記入しましょう

.rubocop.yml
inherit_from:
  - .rubocop_airbnb.yml

#以下にはrubocopで検証したくないフォルダを指定する
AllCops:
  Exclude:
    - 'db/**/*'
    - 'bin/*'
    - 'config/environments/*'
    - 'config/application.rb'
    - 'config/initializers/*'
    - 'config/spring.rb'
    - 'lib/tasks/*'
    - 'vendor/**/*'
    - 'path/ruby'

.rubocop_airbnb.yml
require:
  - rubocop-airbnb

ここまでの設定が終わりましたら、ターミナルで以下を実行

bundle exec rubocop --require rubocop-airbnb

正常に起動すれば大丈夫です。

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away