This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop-txi.yml
78 lines (61 loc) · 1.78 KB
/
.rubocop-txi.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
72
73
74
75
76
77
78
AllCops:
Exclude:
- "db/schema.rb" # You can't touch this
- ".bundle/**/*" # Auto-generated
- "bin/**/*" # Auto-generated
- "vendor/**/*" # We cannot solve the world's problems
TargetRubyVersion: 2.3
Rails:
Enabled: true
Lint/HandleExceptions:
Exclude:
- "config/unicorn/*"
Metrics/AbcSize:
Max: 25
Exclude:
- "db/**/*" # Sometimes migrations are complex.
Metrics/LineLength:
Max: 120
Metrics/MethodLength:
Max: 20
Exclude:
- "db/**/*" # Again, sometimes DB migrations are long.
Metrics/BlockLength:
Exclude:
# These are naturally DSL-y, and so let's be lenient.
- "spec/**/*"
Style/ClassAndModuleChildren:
Exclude:
- "app/controllers/**/*" # We generally use compact style here
Style/Documentation:
Exclude:
- "db/**/*" # No need to require migrations to be documented.
Layout/EmptyLinesAroundBlockBody:
Exclude:
# These are naturally DSL-y, and so let's be lenient.
- "spec/**/*"
- "lib/tasks/*.rake"
Layout/EmptyLinesAroundClassBody:
EnforcedStyle: empty_lines
Exclude:
- "db/**/*" # Migrations are compact by default, and it's not worth the wrestle.
Layout/EmptyLinesAroundModuleBody:
EnforcedStyle: empty_lines
Layout/ExtraSpacing:
Exclude:
- "db/migrate/*" # Generated migrations often have extra spacing
Style/SignalException:
EnforcedStyle: only_raise
Layout/SpaceBeforeFirstArg:
Exclude:
# We often add extra spaces for alignment in factories.
- "spec/factories/**/*"
- "db/migrate/*" # We often add extra spaces for alignment in migrations.
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInLiteral:
EnforcedStyleForMultiline: comma
Style/TrivialAccessors:
ExactNameMatch: true