-
Notifications
You must be signed in to change notification settings - Fork 26
/
.rubocop.yml
106 lines (97 loc) · 2.01 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
require: rubocop-rails
Rails:
Enabled: true
Rails/ActionOrder:
Enabled: false
Rails/I18nLocaleTexts:
Enabled: false
Rails/UniqueValidationWithoutIndex:
Enabled: false
Rails/ApplicationRecord:
Exclude:
- 'lib/**/*'
Rails/HelperInstanceVariable:
# Sometimes useful
Enabled: false
Bundler/OrderedGems:
TreatCommentsAsGroupSeparators: true
Layout/LineLength:
Max: 120
Layout/HashAlignment:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
Metrics/AbcSize:
Max: 30
Metrics/ClassLength:
Max: 250
Metrics/ModuleLength:
Max: 250
Metrics/CyclomaticComplexity:
Max: 8
Metrics/BlockLength:
Enabled: false
Metrics/MethodLength:
Max: 16
Style/Documentation:
Enabled: false
Style/ModuleFunction:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/SymbolArray:
Enabled: false
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/FormatString:
Enabled: false
Style/FormatStringToken:
EnforcedStyle: template
Style/StringConcatenation:
Enabled: false
Style/NegatedIfElseCondition:
Enabled: false
Style/MixinUsage:
Exclude:
- 'bin/setup'
- 'bin/update'
Layout/EmptyLineAfterGuardClause:
Enabled: false
Naming/MethodParameterName:
MinNameLength: 2
AllowedNames:
- _
Naming/VariableNumber:
Enabled: false
# 'old' style
Style/EmptyMethod:
EnforcedStyle: expanded
Rails/SkipsModelValidations:
Exclude:
- 'spec/factories/*'
# None-guard clauses are sometimes clearer
Style/GuardClause:
Enabled: false
# Doesn't understand algorithms
Style/CombinableLoops:
Enabled: false
Lint/UnreachableLoop:
Enabled: false
# This doesn't always make sense
Rails/InverseOf:
Enabled: false
Rails/HttpPositionalArguments:
# Broken for
Exclude:
- 'spec/requests/api/v1/**/*'
AllCops:
Exclude:
- 'db/**/*'
- 'config/**/*'
- 'vendor/**/*'
DisplayCopNames: true
TargetRubyVersion: 2.5
TargetRailsVersion: 5.2
# Enable new cops by default
NewCops: enable