/
.rubocop.yml
196 lines (137 loc) · 2.91 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
inherit_from:
- vendor/hound/config/style_guides/ruby.yml
# Rails cops
AllCops:
RunRailsCops: false
# Files you want to exclude
AllCops:
TargetRubyVersion: 2.7
Exclude:
- Gemfile
- Guardfile
- Rakefile
# TODO: put your overrides here:
Layout/AccessModifierIndentation:
IndentationWidth: 2
Layout/HashAlignment:
Enabled: false
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/EmptyLinesAroundClassBody:
Enabled: false
Layout/EndOfLine:
Enabled: false
Layout/ExtraSpacing:
Enabled: false
Layout/HeredocIndentation:
EnforcedStyle: unindent
Layout/MultilineMethodCallBraceLayout:
Enabled: false
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented_relative_to_receiver
Layout/SpaceBeforeFirstArg:
Enabled: false
Layout/SpaceInsideBlockBraces:
EnforcedStyleForEmptyBraces: space
Lint/AmbiguousRegexpLiteral:
Enabled: false
Lint/AmbiguousBlockAssociation:
Enabled: false
Lint/EmptyWhen:
Enabled: false
Lint/RedundantRequireStatement:
Enabled: false
Metrics/AbcSize:
Max: 25
Metrics/BlockLength:
Exclude:
- 'Rakefile'
- '**/*.rake'
- '**/*_test.rb'
- '**/*_spec.rb'
Metrics/ClassLength:
Max: 200
Metrics/CyclomaticComplexity:
Max: 10
Metrics/LineLength:
Max: 150
Metrics/MethodLength:
Max: 20
Metrics/ModuleLength:
Max: 200
Metrics/ParameterLists:
Max: 10
Metrics/PerceivedComplexity:
Max: 10
Naming/HeredocDelimiterNaming:
Enabled: false
Naming/RescuedExceptionsVariableName:
Enabled: false
Naming/VariableNumber:
Enabled: false
Style/AndOr:
EnforcedStyle: conditionals
Style/ClassAndModuleChildren:
Enabled: true
# Mapping of methods to prefer, alternate => preferred
Style/CollectionMethods:
Enabled: true
PreferredMethods:
collect: 'map'
collect!: 'map!'
inject: 'reduce'
detect: 'find'
find_all: 'select'
length: 'size'
Style/CommentedKeyword:
Enabled: false
Style/Documentation:
Enabled: false
Style/DoubleNegation:
Enabled: false
Style/EachWithObject:
Enabled: false
Style/EmptyMethod:
Enabled: false
Style/FormatStringToken:
Enabled: false
Style/GuardClause:
Enabled: false
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
Style/IfUnlessModifier:
Enabled: false
Style/NegatedIf:
Enabled: false
Style/Lambda:
Enabled: false
Style/Next:
Enabled: false
Style/NumericLiteralPrefix:
Enabled: false
Style/NumericLiterals:
MinDigits: 9
Style/NumericPredicate:
Enabled: false
Style/ParallelAssignment:
Enabled: false
Style/PreferredHashMethods:
Enabled: false
Style/RegexpLiteral:
Enabled: false
Style/RescueStandardError:
Enabled: false
Style/SignalException:
Enabled: false
Style/StringLiterals:
Enabled: false
Style/SymbolArray:
Enabled: false
Style/TrailingCommaInArrayLiteral:
Enabled: false
Style/TrailingCommaInHashLiteral:
Enabled: false
Style/TrailingUnderscoreVariable:
Enabled: false
Style/WordArray:
Enabled: false