Last active
February 3, 2017 04:20
-
-
Save kyohei-shimada/1eae80f83133beb0590ec8d4d5e5ab43 to your computer and use it in GitHub Desktop.
rubocopが一切使われていないRailsアプリにrubocopを段階的に導入していく際にやったこと/やりたいこと ref: http://qiita.com/kyohei_shimada/items/e739dec967eb5e61721c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle exec rubocop -D -R | |
# ... | |
629 files inspected, 8475 offenses detected |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff --shortstat | |
381 files changed, 4285 insertions(+), 4388 deletions(-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/.rubocop_todo.yml | |
+++ b/.rubocop_todo.yml | |
@@ -1092,22 +1092,6 @@ Style/SpaceAfterComma: | |
Style/SpaceAroundEqualsInParameterDefault: | |
Enabled: false | |
-# Offense count: 50 | |
-# Cop supports --auto-correct. | |
-# Configuration parameters: MultiSpaceAllowedForOperators. | |
-Style/SpaceAroundOperators: | |
- Exclude: | |
- # 無視しているファイル名一覧 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+Style/SpaceAroundOperators: | |
+ Severity: warning | |
+ AllowForAlignment: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle exec rubocop -D -R -c .rubocop_todo.yml --only Style/SpaceAroundOperators |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle exec rubocop -D -R -c .rubocop_todo.yml --only Style/SpaceAroundOperators --auto-correct |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'rubocop' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle exec rubocop -R -D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle exec rubocop -R --auto-gen-config --exclude-limit 999999 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle exec rubocop -D -R -c .rubocop_todo.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fail-levelは 3.で直したレベルを設定しておく | |
bundle exec rubocop -R -D --fail-level W |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
touch .rubocop.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inherit_from: .rubocop.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment