Enable rubocop metrics
This enables rubocop metrics like CyclomaticComplexity and ABCSize. Initial threshold values are high, should be probably decreased.
This commit is contained in:
parent
e02940e329
commit
79fb993a65
47
.rubocop.yml
47
.rubocop.yml
|
@ -735,21 +735,37 @@ Metrics/AbcSize:
|
||||||
Description: >-
|
Description: >-
|
||||||
A calculated magnitude based on number of assignments,
|
A calculated magnitude based on number of assignments,
|
||||||
branches, and conditions.
|
branches, and conditions.
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
Max: 70
|
||||||
Metrics/BlockNesting:
|
|
||||||
Description: 'Avoid excessive block nesting'
|
|
||||||
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Metrics/ClassLength:
|
|
||||||
Description: 'Avoid classes longer than 100 lines of code.'
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Metrics/CyclomaticComplexity:
|
Metrics/CyclomaticComplexity:
|
||||||
Description: >-
|
Description: >-
|
||||||
A complexity metric that is strongly correlated to the number
|
A complexity metric that is strongly correlated to the number
|
||||||
of test cases needed to validate a method.
|
of test cases needed to validate a method.
|
||||||
|
Enabled: true
|
||||||
|
Max: 16
|
||||||
|
|
||||||
|
Metrics/PerceivedComplexity:
|
||||||
|
Description: >-
|
||||||
|
A complexity metric geared towards measuring complexity for a
|
||||||
|
human reader.
|
||||||
|
Enabled: true
|
||||||
|
Max: 16
|
||||||
|
|
||||||
|
Metrics/ParameterLists:
|
||||||
|
Description: 'Avoid parameter lists longer than three or four parameters.'
|
||||||
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
|
||||||
|
Enabled: true
|
||||||
|
Max: 8
|
||||||
|
|
||||||
|
Metrics/BlockNesting:
|
||||||
|
Description: 'Avoid excessive block nesting'
|
||||||
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
|
||||||
|
Enabled: true
|
||||||
|
Max: 4
|
||||||
|
|
||||||
|
Metrics/ClassLength:
|
||||||
|
Description: 'Avoid classes longer than 100 lines of code.'
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Metrics/LineLength:
|
Metrics/LineLength:
|
||||||
|
@ -762,17 +778,6 @@ Metrics/MethodLength:
|
||||||
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Metrics/ParameterLists:
|
|
||||||
Description: 'Avoid parameter lists longer than three or four parameters.'
|
|
||||||
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Metrics/PerceivedComplexity:
|
|
||||||
Description: >-
|
|
||||||
A complexity metric geared towards measuring complexity for a
|
|
||||||
human reader.
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
#################### Lint ################################
|
#################### Lint ################################
|
||||||
### Warnings
|
### Warnings
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue