-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
71 lines (63 loc) · 1.69 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
AllCops:
TargetRubyVersion: 2.4
Include:
- '**/Rakefile'
- '**/config.ru'
- 'lib/tasks/**/*'
Exclude:
- Gemfile*
- 'db/migrate/*'
- 'db/schema.rb'
- 'bin/**/*'
- 'vendor/bundle/**/*'
- 'node_modules/**/*'
- 'config/environments/production.rb'
- 'config/initializers/devise.rb'
# We don't care about method length, since we check method cyclomatic
# complexity.
Metrics/MethodLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/PerceivedComplexity:
Max: 10
Metrics/CyclomaticComplexity:
Max: 8
Metrics/AbcSize:
# The ABC size is a calculated magnitude, so this number can be a Fixnum or
# a Float.
Max: 35
# Trailing commas make for clearer diffs because the last line won't appear
# to have been changed, as it would if it lacked a comma and had one added.
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInLiteral:
EnforcedStyleForMultiline: comma
# Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters:
PreferredDelimiters:
# Using `[]` for string arrays instead of `()`, since normal arrays are
# indicated with `[]` not `()`.
'%w': '[]'
'%W': '[]'
Style/AndOr:
# Whether `and` and `or` are banned only in conditionals (conditionals)
# or completely (always).
# They read better, more like normal English.
Enabled: false
Style/ClassAndModuleChildren:
Exclude:
- 'app/controllers/**/*'
Style/ConditionalAssignment:
Enabled: false
Metrics/LineLength:
Max: 140
Exclude:
- 'config/routes.rb'
Metrics/BlockLength:
Max: 25
Exclude:
- 'config/routes.rb'
- 'spec/**/*_spec.rb'
- 'spec/support/**/*'