Skip to content

Commit

Permalink
Merge pull request #124 from SonicGarden/add-method-length-count-as-one
Browse files Browse the repository at this point in the history
[review]MethodLength系のrubocop設定にCountAsOneを追加
  • Loading branch information
aki77 authored Dec 15, 2022
2 parents 1a261f6 + 1063aed commit 910379b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion rails/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,26 @@ Metrics/BlockLength:
- "config/routes.rb"
- "spec/**/*"
- "db/migrate/*"
# 要素を縦に並べるのは可読性のためなので実行数が増えても許容する
CountAsOne: ['array', 'hash', 'method_call']

# migratonは致し方ない
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsmethodlength
Metrics/MethodLength:
# migratonは致し方ない
Exclude:
- "db/migrate/*"
# 要素を縦に並べるのは可読性のためなので実行数が増えても許容する
CountAsOne: ['array', 'hash', 'method_call']

# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsclasslength
Metrics/ClassLength:
# 要素を縦に並べるのは可読性のためなので実行数が増えても許容する
CountAsOne: ['array', 'hash', 'method_call']

# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsmodulelength
Metrics/ModuleLength:
# 要素を縦に並べるのは可読性のためなので実行数が増えても許容する
CountAsOne: ['array', 'hash', 'method_call']

# migratonは致し方ない
# https://docs.rubocop.org/rubocop/cops_metrics.html#metricsabcsize
Expand Down

0 comments on commit 910379b

Please sign in to comment.