-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
317 lines (228 loc) · 6.92 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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
require:
- rubocop-rails
- rubocop-performance
- rubocop-rspec
- ./lib/rubocop/cop/root_cops/avoid_ruby_prof.rb
- ./lib/rubocop/cop/root_cops/eq_be_eql.rb
- ./lib/rubocop/cop/root_cops/factories/factory_file_name.rb
- ./lib/rubocop/cop/root_cops/factories/factory_name.rb
- ./lib/rubocop/cop/root_cops/job_has_queue.rb
- ./lib/rubocop/cop/root_cops/must_include.rb
- ./lib/rubocop/cop/root_cops/must_inherit.rb
- ./lib/rubocop/cop/root_cops/no_backfills_in_data_migration.rb
- ./lib/rubocop/cop/root_cops/no_index_on_add_column.rb
- ./lib/rubocop/cop/root_cops/no_tracers.rb
- ./lib/rubocop/cop/root_cops/private_methods/called_private_method.rb
- ./lib/rubocop/cop/root_cops/private_methods/called_protected.rb
- ./lib/rubocop/cop/root_cops/private_methods/underscore_prefix.rb
- ./lib/rubocop/cop/root_cops/raise_i18n.rb
- ./lib/rubocop/cop/root_cops/retry_on_warning.rb
- ./lib/rubocop/cop/root_cops/shared_context_name.rb
- ./lib/rubocop/cop/root_cops/spec_file_name.rb
- ./lib/rubocop/cop/root_cops/unnecessary_aggregate_failures.rb
- ./lib/rubocop/cop/root_cops/use_before_action.rb
- ./lib/rubocop/cop/root_cops/use_detect.rb
- ./lib/rubocop/cop/root_cops/use_envvars.rb
- ./lib/rubocop/cop/root_cops/use_lonely_operator.rb
- ./lib/rubocop/cop/root_cops/up_and_down_or_change.rb
- ./lib/rubocop/cop/root_cops/envvar_assignment.rb
AllCops:
TargetRubyVersion: 3.0.2
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/LineLength:
Enabled: false
Lint/Debugger:
AutoCorrect: false
Lint/IneffectiveAccessModifier:
Enabled: false
Lint/UselessAccessModifier:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/ParameterLists:
Max: 7
Metrics/PerceivedComplexity:
Enabled: false
# prefixes should be avoided before predicates in general, but they make sense
# in some cases, particularly if an arg is being passed to the method
Naming/PredicateName:
Enabled: false
Naming/RescuedExceptionsVariableName:
Enabled: false
Performance/Casecmp:
Enabled: false
Rails:
Enabled: true
# habtm should be avoided in general, but is okay in select cases
Rails/HasAndBelongsToMany:
Enabled: false
Rails/FilePath:
Enabled: false
RSpec:
Enabled: true
RSpec/ContextWording:
Enabled: false
RSpec/DescribeClass:
Enabled: false
RSpec/ExampleLength:
Enabled: false
RSpec/LeakyConstantDeclaration:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
RSpec/NotToNot:
Enabled: true
EnforcedStyle: not_to
RSpec/NestedGroups:
Enabled: false
Style/ConditionalAssignment:
Enabled: false
# class documentation isn't necessary
Style/Documentation:
Enabled: false
# use !! to return a boolean where appropriate
Style/DoubleNegation:
Enabled: false
# not going to force using guard clauses
Style/GuardClause:
Enabled: false
Style/FloatDivision:
Enabled: false
# continue to use string#freeze instead
Style/FrozenStringLiteralComment:
Enabled: false
# Allow use of 1.8 and 1.9 style hashes, but not both in the same hash
Style/HashSyntax:
EnforcedStyle: no_mixed_keys
Style/HashEachMethods:
Enabled: false
Style/HashTransformKeys:
Enabled: false
Style/HashTransformValues:
Enabled: false
# not requiring guard clauses for single-line bodies
Style/IfUnlessModifier:
Enabled: false
Style/NumericLiterals:
MinDigits: 6
Style/OptionalBooleanParameter:
Enabled: false
Style/StringConcatenation:
Enabled: false
# use raise to raise an exception
Style/SignalException:
EnforcedStyle: only_raise
# use double quotes for string literals
Style/StringLiterals:
EnforcedStyle: double_quotes
# okay to use double quotes inside interpolation
Style/StringLiteralsInInterpolation:
Enabled: false
# disabling this so that %w() syntax isn't required in nested arrays which would have mixed syntax
Style/WordArray:
Enabled: false
# UnnecessaryAggregateFailures is off by default because it requires extra configuration within the project that uses it
RootCops/UnnecessaryAggregateFailures:
Enabled: false
# MustInherit is off by default because it requires extra configuration within the project that uses it
# including project must configure the proper Mapping (see MustInherit class for config details)
RootCops/MustInherit:
Enabled: false
#
# MustInclude is off by default because it requires extra configuration within the project that uses it
# including project must configure the proper Mapping (see MustInclude class for config details)
RootCops/MustInclude:
Enabled: false
RSpec/FactoryBot/CreateList:
Enabled: false
Lint/ConstantDefinitionInBlock:
Enabled: false
Style/CombinableLoops:
Enabled: false
Gemspec/RequiredRubyVersion:
Enabled: false
Style/SlicingWithRange:
Enabled: false
Gemspec/DeprecatedAttributeAssignment:
Enabled: true
Layout/LineEndStringConcatenationIndentation: # (new in 1.18)
Enabled: false
Layout/SpaceBeforeBrackets: # (new in 1.7)
Enabled: false
Lint/AmbiguousAssignment: # (new in 1.7)
Enabled: true
Lint/DeprecatedConstants: # (new in 1.8)
Enabled: false
Lint/DuplicateBranch: # (new in 1.3)
Enabled: false
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
Enabled: true
Lint/EmptyBlock: # (new in 1.1)
Enabled: false
Lint/EmptyClass: # (new in 1.3)
Enabled: false
Lint/EmptyInPattern: # (new in 1.16)
Enabled: false
Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
Enabled: false
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
Enabled: false
Lint/NumberedParameterAssignment: # (new in 1.9)
Enabled: false
Lint/OrAssignmentToConstant: # (new in 1.9)
Enabled: false
Lint/RedundantDirGlobSort: # (new in 1.8)
Enabled: true
Lint/SymbolConversion: # (new in 1.9)
Enabled: true
Lint/ToEnumArguments: # (new in 1.1)
Enabled: false
Lint/TripleQuotes: # (new in 1.9)
Enabled: true
Lint/UnexpectedBlockArity: # (new in 1.5)
Enabled: false
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
Enabled: true
Naming/InclusiveLanguage: # (new in 1.18)
Enabled: false
Style/ArgumentsForwarding: # (new in 1.1)
Enabled: false
Style/CollectionCompact: # (new in 1.2)
Enabled: false
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
Enabled: false
Style/EndlessMethod: # (new in 1.8)
Enabled: false
Style/HashConversion: # (new in 1.10)
Enabled: true
Style/HashExcept: # (new in 1.7)
Enabled: false
Style/IfWithBooleanLiteralBranches: # (new in 1.9)
Enabled: true
Style/InPatternThen: # (new in 1.16)
Enabled: false
Style/MultilineInPatternThen: # (new in 1.16)
Enabled: false
Style/NegatedIfElseCondition: # (new in 1.2)
Enabled: false
Style/NilLambda: # (new in 1.3)
Enabled: false
Style/QuotedSymbols: # (new in 1.16)
Enabled: false
Style/RedundantArgument: # (new in 1.4)
Enabled: false
Style/StringChars: # (new in 1.12)
Enabled: false
Style/SwapValues: # (new in 1.1)
Enabled: false