Lint: Disable Metrics/MethodLength

The number of lines in a method is not a useful metric compared to `AbcSize`.
It's common to have very long methods (> 50 lines) which are quite simple. For
example, a method that returns a long string with only a few interpolations.

[ci skip]
This commit is contained in:
Jared Beck 2016-04-01 12:33:22 -04:00
parent 11f885cfe3
commit 38c4193b4a
2 changed files with 4 additions and 9 deletions

View File

@ -21,11 +21,11 @@ Metrics/ClassLength:
Metrics/LineLength:
Max: 100
# Migrations often contain long up/down methods, and extracting smaller methods
# from these is of questionable value.
# The number of lines in a method is not a useful metric compared to `AbcSize`.
# It's common to have very long methods (> 50 lines) which are quite simple. For
# example, a method that returns a long string with only a few interpolations.
Metrics/MethodLength:
Exclude:
- 'test/dummy/db/migrate/*'
Enabled: false
Style/AlignParameters:
EnforcedStyle: with_fixed_indentation

View File

@ -11,11 +11,6 @@ Metrics/AbcSize:
Metrics/CyclomaticComplexity:
Max: 13
# Offense count: 19
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 35
# Offense count: 2
# Configuration parameters: CountComments.
Metrics/ModuleLength: