Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
rubocopが一切使われていないRailsアプリにrubocopを段階的に導入していく際にやったこと/やりたいこと ref:
bundle exec rubocop -D -R
# ...
629 files inspected, 8475 offenses detected
git diff --shortstat
381 files changed, 4285 insertions(+), 4388 deletions(-)
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1092,22 +1092,6 @@ Style/SpaceAfterComma:
Enabled: false
-# Offense count: 50
-# Cop supports --auto-correct.
-# Configuration parameters: MultiSpaceAllowedForOperators.
- Exclude:
- # 無視しているファイル名一覧
+ Severity: warning
+ AllowForAlignment: true
bundle exec rubocop -D -R -c .rubocop_todo.yml --only Style/SpaceAroundOperators
bundle exec rubocop -D -R -c .rubocop_todo.yml --only Style/SpaceAroundOperators --auto-correct
gem 'rubocop'
bundle install
bundle exec rubocop -R -D
bundle exec rubocop -R --auto-gen-config --exclude-limit 999999
bundle exec rubocop -D -R -c .rubocop_todo.yml
# fail-levelは 3.で直したレベルを設定しておく
bundle exec rubocop -R -D --fail-level W
touch .rubocop.yml
inherit_from: .rubocop.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment