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:
parent
11f885cfe3
commit
38c4193b4a
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue