-
Notifications
You must be signed in to change notification settings - Fork 2
/
.rubocop.yml
52 lines (44 loc) · 1.06 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
require:
- rubocop-performance
- rubocop-rails
# Stolen from https://gist.github.com/jhass/a5ae80d87f18e53e7b56
AllCops:
Exclude:
- "bin/**/*"
- "db/schema.rb"
- 'node_modules/**/*'
- 'vendor/**/*'
- '.git/**/*'
# Enable Rails
Rails:
Enabled: true
# Commonly used screens these days easily fit more than 80 characters.
Metrics/LineLength:
Max: 120
# Too short methods lead to extraction of single-use methods, which can make
# the code easier to read (by naming things), but can also clutter the class
Metrics/MethodLength:
Exclude:
- "db/migrate/*"
Max: 50
# The guiding principle of classes is SRP, SRP can't be accurately measured by LoC
Metrics/ClassLength:
Max: 1500
Metrics/ModuleLength:
Max: 1500
# Raise AbcSize from 15 to 20
Metrics/AbcSize:
Exclude:
- "db/migrate/*"
Max: 50
Metrics/BlockLength:
ExcludedMethods:
- "namespace"
- "create_table"
Exclude:
- "config/**/*.rb"
- "spec/**/*.rb"
# Disable documentation checks for now
# should be done with yard instead
Style/Documentation:
Enabled: false