Skip to content

Commit

Permalink
Merge pull request #2734 from coopdevs/make-rubocop-useful
Browse files Browse the repository at this point in the history
Get useful feedback from Rubocop Metrics cops
  • Loading branch information
mkllnk authored Sep 23, 2018
2 parents 89be54f + 0ac16ce commit f0bb927
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 123 deletions.
16 changes: 8 additions & 8 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2"
plugins:
rubocop:
enabled: true
channel: "rubocop-0-55"
channel: "rubocop-0-57"
scss-lint:
enabled: true
checks:
Expand All @@ -19,23 +19,23 @@ checks:
argument-count:
enabled: false
complex-logic:
enabled: true
enabled: false
file-lines:
enabled: true
enabled: false
method-complexity:
enabled: true
enabled: false
method-count:
enabled: false
method-lines:
enabled: false
nested-control-flow:
enabled: true
enabled: false
return-statements:
enabled: true
enabled: false
similar-code:
enabled: true
enabled: false
identical-code:
enabled: true
enabled: false
exclude_patterns:
- "spec/**/*"
- "vendor/**/*"
Expand Down
22 changes: 9 additions & 13 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ inherit_from:
AllCops:
TargetRubyVersion: 2.1
TargetRailsVersion: 3.2
Include:
- '**/Rakefile'
- '**/config.ru'
Exclude:
- 'db/**/*'
- 'config/**/*'
- 'script/**/*'
- 'vendor/**/*'
- 'node_modules/**/*'
- !ruby/regexp /old_and_unused\.rb$/
# The parser gem fails to parse this file with out current Ruby version.
- 'spec/factories.rb'

Expand Down Expand Up @@ -177,28 +173,28 @@ Lint/AssignmentInCondition:
StyleGuide: http://relaxed.ruby.style/#lintassignmentincondition

Metrics/AbcSize:
Enabled: false
Max: 15

Metrics/BlockNesting:
Enabled: false
Max: 3

Metrics/ClassLength:
Enabled: false
Max: 100

Metrics/ModuleLength:
Enabled: false
Max: 100

Metrics/CyclomaticComplexity:
Enabled: false
Max: 6

Metrics/LineLength:
Enabled: false
Max: 80

Metrics/MethodLength:
Enabled: false
Max: 10

Metrics/ParameterLists:
Enabled: false
Max: 5

Metrics/PerceivedComplexity:
Enabled: false
Max: 7
Loading

0 comments on commit f0bb927

Please sign in to comment.