deep_pluck 1.1.0 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/FUNDING.yml +12 -0
- data/.gitignore +10 -9
- data/.rubocop.yml +1227 -1193
- data/.travis.yml +42 -21
- data/CHANGELOG.md +63 -0
- data/CODE_OF_CONDUCT.md +48 -48
- data/LICENSE.txt +21 -21
- data/README.md +172 -145
- data/Rakefile +5 -5
- data/bin/console +3 -3
- data/bin/setup +8 -8
- data/deep_pluck.gemspec +45 -38
- data/gemfiles/3.2.gemfile +11 -14
- data/gemfiles/4.2.gemfile +11 -14
- data/gemfiles/5.0.gemfile +11 -14
- data/gemfiles/5.1.gemfile +11 -14
- data/gemfiles/5.2.gemfile +11 -0
- data/gemfiles/6.0.gemfile +11 -0
- data/gemfiles/6.1.gemfile +11 -0
- data/lib/deep_pluck.rb +23 -24
- data/lib/deep_pluck/data_combiner.rb +3 -3
- data/lib/deep_pluck/model.rb +64 -12
- data/lib/deep_pluck/version.rb +3 -3
- metadata +38 -10
- data/lib/deep_pluck/preloaded_model.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 542e1ba086c4b2a8df7fb4efbf916c3448f207824717272e67bbba581154b3dc
|
4
|
+
data.tar.gz: 6710c826f3ae127d4530863b690541fe048ac6f8b3fc54a18e2da8ecd8629ee4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8c17c52a55de2a7de18ecf762adefe017f05cef401f4e0098d8ce0b5699898ac97918cbede23f802ed8ff4709c1b5655938d64c3511e72494e9777a2ec98e5e
|
7
|
+
data.tar.gz: 21aae7d86d41d53d4b05824ba13a5b7e9c7486ae9f83552146891f62397d8b03e5fc7b6b99c71c60837782d608767a8054e4674af72c2c0fbd655a1e324627a1
|
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# These are supported funding model platforms
|
2
|
+
|
3
|
+
github: [khiav223577] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
4
|
+
patreon: # Replace with a single Patreon username
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
7
|
+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
11
|
+
otechie: # Replace with a single Otechie username
|
12
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
data/.gitignore
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/Gemfile.lock
|
4
|
-
/
|
5
|
-
/
|
6
|
-
/
|
7
|
-
/
|
8
|
-
/
|
9
|
-
/
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/Gemfile.lock
|
4
|
+
/gemfiles/*.gemfile.lock
|
5
|
+
/_yardoc/
|
6
|
+
/coverage/
|
7
|
+
/doc/
|
8
|
+
/pkg/
|
9
|
+
/spec/reports/
|
10
|
+
/tmp/
|
data/.rubocop.yml
CHANGED
@@ -1,1193 +1,1227 @@
|
|
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
|
-
Enabled: true
|
28
|
-
|
29
|
-
|
30
|
-
Description:
|
31
|
-
Enabled: true
|
32
|
-
|
33
|
-
Lint/
|
34
|
-
Description:
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
Enabled: true
|
43
|
-
|
44
|
-
Lint/
|
45
|
-
Description: '
|
46
|
-
Enabled: true
|
47
|
-
|
48
|
-
|
49
|
-
Description: '
|
50
|
-
Enabled: true
|
51
|
-
|
52
|
-
Lint/
|
53
|
-
Description: 'Check for
|
54
|
-
Enabled: true
|
55
|
-
|
56
|
-
Lint/
|
57
|
-
Description: 'Check for
|
58
|
-
Enabled: true
|
59
|
-
|
60
|
-
Lint/
|
61
|
-
Description: 'Check for
|
62
|
-
Enabled: true
|
63
|
-
|
64
|
-
Lint/
|
65
|
-
Description: '
|
66
|
-
Enabled: true
|
67
|
-
|
68
|
-
Lint/
|
69
|
-
Description: 'Checks for empty
|
70
|
-
Enabled: true
|
71
|
-
|
72
|
-
Lint/
|
73
|
-
Description: '
|
74
|
-
Enabled: true
|
75
|
-
|
76
|
-
|
77
|
-
Description: '
|
78
|
-
Enabled: true
|
79
|
-
|
80
|
-
Lint/EnsureReturn:
|
81
|
-
Description: 'Do not use return in an ensure block.'
|
82
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
|
83
|
-
Enabled: true
|
84
|
-
|
85
|
-
Security/Eval:
|
86
|
-
Description: 'The use of eval represents a serious security risk.'
|
87
|
-
Enabled: true
|
88
|
-
|
89
|
-
Lint/FormatParameterMismatch:
|
90
|
-
Description: 'The number of parameters to format/sprint must match the fields.'
|
91
|
-
Enabled: true
|
92
|
-
|
93
|
-
Lint/
|
94
|
-
Description: "Don't suppress exception."
|
95
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
|
96
|
-
Enabled: true
|
97
|
-
|
98
|
-
Lint/LiteralInInterpolation:
|
99
|
-
Description: 'Checks for literals used in interpolation.'
|
100
|
-
Enabled: true
|
101
|
-
|
102
|
-
Lint/Loop:
|
103
|
-
Description: >-
|
104
|
-
Use Kernel#loop with break rather than begin/end/until or
|
105
|
-
begin/end/while for post-loop tests.
|
106
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
|
107
|
-
Enabled: true
|
108
|
-
|
109
|
-
Lint/NestedMethodDefinition:
|
110
|
-
Description: 'Do not use nested method definitions.'
|
111
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
|
112
|
-
Enabled: true
|
113
|
-
|
114
|
-
Lint/NonLocalExitFromIterator:
|
115
|
-
Description: 'Do not use return in iterator to cause non-local exit.'
|
116
|
-
Enabled: true
|
117
|
-
|
118
|
-
Lint/ParenthesesAsGroupedExpression:
|
119
|
-
Description: >-
|
120
|
-
Checks for method calls with a space before the opening
|
121
|
-
parenthesis.
|
122
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
123
|
-
Enabled: true
|
124
|
-
|
125
|
-
Lint/RequireParentheses:
|
126
|
-
Description: >-
|
127
|
-
Use parentheses in the method call to avoid confusion
|
128
|
-
about precedence.
|
129
|
-
Enabled: true
|
130
|
-
|
131
|
-
Lint/RescueException:
|
132
|
-
Description: 'Avoid rescuing the Exception class.'
|
133
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
|
134
|
-
Enabled: true
|
135
|
-
|
136
|
-
Lint/ShadowingOuterLocalVariable:
|
137
|
-
Description: >-
|
138
|
-
Do not use the same name as outer local variable
|
139
|
-
for block arguments or block local variables.
|
140
|
-
Enabled: true
|
141
|
-
|
142
|
-
Lint/
|
143
|
-
Description: 'Checks for Object#to_s usage in string interpolation.'
|
144
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
|
145
|
-
Enabled: true
|
146
|
-
|
147
|
-
Lint/UnderscorePrefixedVariableName:
|
148
|
-
Description: 'Do not use prefix `_` for a variable that is used.'
|
149
|
-
Enabled: true
|
150
|
-
|
151
|
-
Lint/
|
152
|
-
Description: >-
|
153
|
-
Checks for rubocop:disable comments that can be removed.
|
154
|
-
Note: this cop is not disabled when disabling all cops.
|
155
|
-
It must be explicitly disabled.
|
156
|
-
Enabled: true
|
157
|
-
|
158
|
-
Lint/UnusedBlockArgument:
|
159
|
-
Description: 'Checks for unused block arguments.'
|
160
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
161
|
-
Enabled: true
|
162
|
-
|
163
|
-
Lint/UnusedMethodArgument:
|
164
|
-
Description: 'Checks for unused method arguments.'
|
165
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
166
|
-
Enabled: true
|
167
|
-
|
168
|
-
Lint/UnreachableCode:
|
169
|
-
Description: 'Unreachable code.'
|
170
|
-
Enabled: true
|
171
|
-
|
172
|
-
Lint/UselessAccessModifier:
|
173
|
-
Description: 'Checks for useless access modifiers.'
|
174
|
-
Enabled: true
|
175
|
-
|
176
|
-
Lint/UselessAssignment:
|
177
|
-
Description: 'Checks for useless assignment to a local variable.'
|
178
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
179
|
-
Enabled: true
|
180
|
-
|
181
|
-
Lint/
|
182
|
-
Description: '
|
183
|
-
Enabled: true
|
184
|
-
|
185
|
-
Lint/UselessElseWithoutRescue:
|
186
|
-
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
187
|
-
Enabled: true
|
188
|
-
|
189
|
-
Lint/UselessSetterCall:
|
190
|
-
Description: 'Checks for useless setter call to a local variable.'
|
191
|
-
Enabled: true
|
192
|
-
|
193
|
-
Lint/Void:
|
194
|
-
Description: 'Possible use of operator/literal/variable in void context.'
|
195
|
-
Enabled: true
|
196
|
-
|
197
|
-
###################### Metrics ####################################
|
198
|
-
|
199
|
-
Metrics/AbcSize:
|
200
|
-
Description: >-
|
201
|
-
A calculated magnitude based on number of assignments,
|
202
|
-
branches, and conditions.
|
203
|
-
Reference: 'http://c2.com/cgi/wiki?AbcMetric'
|
204
|
-
Enabled: true
|
205
|
-
Max: 25
|
206
|
-
|
207
|
-
Metrics/BlockNesting:
|
208
|
-
Description: 'Avoid excessive block nesting'
|
209
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
|
210
|
-
Enabled: true
|
211
|
-
Max: 4
|
212
|
-
|
213
|
-
Metrics/ClassLength:
|
214
|
-
Description: 'Avoid classes longer than 250 lines of code.'
|
215
|
-
Enabled: true
|
216
|
-
Max: 250
|
217
|
-
|
218
|
-
Metrics/CyclomaticComplexity:
|
219
|
-
Description: >-
|
220
|
-
A complexity metric that is strongly correlated to the number
|
221
|
-
of test cases needed to validate a method.
|
222
|
-
Enabled: true
|
223
|
-
|
224
|
-
|
225
|
-
Description: 'Limit lines to 120 characters.'
|
226
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
|
227
|
-
Max: 120
|
228
|
-
Enabled: true
|
229
|
-
Exclude:
|
230
|
-
- 'config/locales/**'
|
231
|
-
|
232
|
-
Metrics/MethodLength:
|
233
|
-
Description: 'Avoid methods longer than 30 lines of code.'
|
234
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
|
235
|
-
Enabled: true
|
236
|
-
Max: 30
|
237
|
-
|
238
|
-
Metrics/ModuleLength:
|
239
|
-
Description: 'Avoid modules longer than 250 lines of code.'
|
240
|
-
Enabled: true
|
241
|
-
Max: 250
|
242
|
-
|
243
|
-
Metrics/ParameterLists:
|
244
|
-
Description: 'Avoid parameter lists longer than three or four parameters.'
|
245
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
|
246
|
-
Enabled: true
|
247
|
-
|
248
|
-
Metrics/PerceivedComplexity:
|
249
|
-
Description: >-
|
250
|
-
A complexity metric geared towards measuring complexity for a
|
251
|
-
human reader.
|
252
|
-
Enabled: true
|
253
|
-
|
254
|
-
##################### Performance #############################
|
255
|
-
|
256
|
-
Performance/Count:
|
257
|
-
Description: >-
|
258
|
-
Use `count` instead of `select...size`, `reject...size`,
|
259
|
-
`select...count`, `reject...count`, `select...length`,
|
260
|
-
and `reject...length`.
|
261
|
-
Enabled: true
|
262
|
-
|
263
|
-
Performance/Detect:
|
264
|
-
Description: >-
|
265
|
-
Use `detect` instead of `select.first`, `find_all.first`,
|
266
|
-
`select.last`, and `find_all.last`.
|
267
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
|
268
|
-
Enabled: true
|
269
|
-
|
270
|
-
Performance/FlatMap:
|
271
|
-
Description: >-
|
272
|
-
Use `Enumerable#flat_map`
|
273
|
-
instead of `Enumerable#map...Array#flatten(1)`
|
274
|
-
or `Enumberable#collect..Array#flatten(1)`
|
275
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
|
276
|
-
Enabled: true
|
277
|
-
EnabledForFlattenWithoutParams: false
|
278
|
-
# If enabled, this cop will warn about usages of
|
279
|
-
# `flatten` being called without any parameters.
|
280
|
-
# This can be dangerous since `flat_map` will only flatten 1 level, and
|
281
|
-
# `flatten` without any parameters can flatten multiple levels.
|
282
|
-
|
283
|
-
Performance/ReverseEach:
|
284
|
-
Description: 'Use `reverse_each` instead of `reverse.each`.'
|
285
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
|
286
|
-
Enabled: true
|
287
|
-
|
288
|
-
|
289
|
-
Description: >-
|
290
|
-
Use `sample` instead of `shuffle.first`,
|
291
|
-
`shuffle.last`, and `shuffle[Fixnum]`.
|
292
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
|
293
|
-
Enabled: true
|
294
|
-
|
295
|
-
Performance/Size:
|
296
|
-
Description: >-
|
297
|
-
Use `size` instead of `count` for counting
|
298
|
-
the number of elements in `Array` and `Hash`.
|
299
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
|
300
|
-
Enabled: true
|
301
|
-
|
302
|
-
Performance/StringReplacement:
|
303
|
-
Description: >-
|
304
|
-
Use `tr` instead of `gsub` when you are replacing the same
|
305
|
-
number of characters. Use `delete` instead of `gsub` when
|
306
|
-
you are deleting characters.
|
307
|
-
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
|
308
|
-
Enabled: true
|
309
|
-
|
310
|
-
##################### Rails ##################################
|
311
|
-
|
312
|
-
Rails/ActionFilter:
|
313
|
-
Description: 'Enforces consistent use of action filter methods.'
|
314
|
-
Enabled: true
|
315
|
-
|
316
|
-
Rails/Date:
|
317
|
-
Description: >-
|
318
|
-
Checks the correct usage of date aware methods,
|
319
|
-
such as Date.today, Date.current etc.
|
320
|
-
Enabled: true
|
321
|
-
|
322
|
-
Rails/Delegate:
|
323
|
-
Description: 'Prefer delegate method for delegations.'
|
324
|
-
Enabled: true
|
325
|
-
|
326
|
-
Rails/FindBy:
|
327
|
-
Description: 'Prefer find_by over where.first.'
|
328
|
-
Enabled: true
|
329
|
-
|
330
|
-
Rails/FindEach:
|
331
|
-
Description: 'Prefer all.find_each over all.find.'
|
332
|
-
Enabled: true
|
333
|
-
|
334
|
-
Rails/HasAndBelongsToMany:
|
335
|
-
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
|
336
|
-
Enabled: true
|
337
|
-
|
338
|
-
Rails/Output:
|
339
|
-
Description: 'Checks for calls to puts, print, etc.'
|
340
|
-
Enabled: true
|
341
|
-
|
342
|
-
Rails/ReadWriteAttribute:
|
343
|
-
Description: >-
|
344
|
-
Checks for read_attribute(:attr) and
|
345
|
-
write_attribute(:attr, val).
|
346
|
-
Enabled: true
|
347
|
-
|
348
|
-
Rails/ScopeArgs:
|
349
|
-
Description: 'Checks the arguments of ActiveRecord scopes.'
|
350
|
-
Enabled: true
|
351
|
-
|
352
|
-
Rails/TimeZone:
|
353
|
-
Description: 'Checks the correct usage of time zone aware methods.'
|
354
|
-
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
|
355
|
-
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
|
356
|
-
Enabled:
|
357
|
-
|
358
|
-
Rails/Validation:
|
359
|
-
Description: 'Use validates :attribute, hash of validations.'
|
360
|
-
Enabled: true
|
361
|
-
|
362
|
-
################## Style #################################
|
363
|
-
|
364
|
-
Layout/AccessModifierIndentation:
|
365
|
-
Description: Check indentation of private/protected visibility modifiers.
|
366
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
|
367
|
-
Enabled: true
|
368
|
-
|
369
|
-
Naming/AccessorMethodName:
|
370
|
-
Description: Check the naming of accessor methods for get_/set_.
|
371
|
-
Enabled: false
|
372
|
-
|
373
|
-
Style/Alias:
|
374
|
-
Description: 'Use alias_method instead of alias.'
|
375
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
|
376
|
-
Enabled: true
|
377
|
-
|
378
|
-
Layout/
|
379
|
-
Description: >-
|
380
|
-
Align the elements of an array literal if they span more than
|
381
|
-
one line.
|
382
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
|
383
|
-
Enabled: true
|
384
|
-
|
385
|
-
Layout/
|
386
|
-
Description: >-
|
387
|
-
Align the elements of a hash literal if they span more than
|
388
|
-
one line.
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
Enabled:
|
638
|
-
|
639
|
-
Style/GlobalVars:
|
640
|
-
Description: 'Do not introduce global variables.'
|
641
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
|
642
|
-
Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
|
643
|
-
Enabled: true
|
644
|
-
|
645
|
-
Style/GuardClause:
|
646
|
-
Description: 'Check for conditionals that can be replaced with guard clauses'
|
647
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
648
|
-
Enabled: true
|
649
|
-
|
650
|
-
Style/HashSyntax:
|
651
|
-
Description: >-
|
652
|
-
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
|
653
|
-
{ :a => 1, :b => 2 }.
|
654
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
|
655
|
-
Enabled: true
|
656
|
-
|
657
|
-
Style/IfUnlessModifier:
|
658
|
-
Description: >-
|
659
|
-
Favor modifier if/unless usage when you have a
|
660
|
-
single-line body.
|
661
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
|
662
|
-
Enabled: true
|
663
|
-
|
664
|
-
Style/IfWithSemicolon:
|
665
|
-
Description: 'Do not use if x; .... Use the ternary operator instead.'
|
666
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
|
667
|
-
Enabled: true
|
668
|
-
|
669
|
-
Layout/IndentationConsistency:
|
670
|
-
Description: 'Keep indentation straight.'
|
671
|
-
Enabled: true
|
672
|
-
|
673
|
-
Layout/IndentationWidth:
|
674
|
-
Description: 'Use 2 spaces for indentation.'
|
675
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
676
|
-
Enabled: true
|
677
|
-
|
678
|
-
Layout/
|
679
|
-
Description: >-
|
680
|
-
Checks the indentation of the first element in an array
|
681
|
-
literal.
|
682
|
-
EnforcedStyle: consistent
|
683
|
-
Enabled: true
|
684
|
-
|
685
|
-
Layout/
|
686
|
-
Description: 'Checks the indentation of the first key in a hash literal.'
|
687
|
-
EnforcedStyle: consistent
|
688
|
-
Enabled: true
|
689
|
-
|
690
|
-
Style/InfiniteLoop:
|
691
|
-
Description: 'Use Kernel#loop for infinite loops.'
|
692
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
|
693
|
-
Enabled: true
|
694
|
-
|
695
|
-
Style/Lambda:
|
696
|
-
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
697
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
|
698
|
-
Enabled: true
|
699
|
-
|
700
|
-
Style/LambdaCall:
|
701
|
-
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
702
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
|
703
|
-
Enabled: true
|
704
|
-
|
705
|
-
Layout/LeadingCommentSpace:
|
706
|
-
Description: 'Comments should start with a space.'
|
707
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
|
708
|
-
Enabled: true
|
709
|
-
|
710
|
-
Style/LineEndConcatenation:
|
711
|
-
Description: >-
|
712
|
-
Use \ instead of + or << to concatenate two string literals at
|
713
|
-
line end.
|
714
|
-
Enabled: true
|
715
|
-
|
716
|
-
Style/MethodCallWithoutArgsParentheses:
|
717
|
-
Description: 'Do not use parentheses for method calls with no arguments.'
|
718
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
|
719
|
-
Enabled: true
|
720
|
-
|
721
|
-
Style/MethodDefParentheses:
|
722
|
-
Description: >-
|
723
|
-
Checks if the method definitions have or don't have
|
724
|
-
parentheses.
|
725
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
726
|
-
Enabled: true
|
727
|
-
|
728
|
-
Naming/MethodName:
|
729
|
-
Description: 'Use the configured style when naming methods.'
|
730
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
|
731
|
-
Enabled: true
|
732
|
-
|
733
|
-
Style/ModuleFunction:
|
734
|
-
Description: 'Checks for usage of `extend self` in modules.'
|
735
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
|
736
|
-
Enabled: true
|
737
|
-
|
738
|
-
Style/MultilineBlockChain:
|
739
|
-
Description: 'Avoid multi-line chains of blocks.'
|
740
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
741
|
-
Enabled: true
|
742
|
-
|
743
|
-
Layout/MultilineBlockLayout:
|
744
|
-
Description: 'Ensures newlines after multiline block do statements.'
|
745
|
-
Enabled: true
|
746
|
-
|
747
|
-
Style/MultilineIfThen:
|
748
|
-
Description: 'Do not use then for multi-line if/unless.'
|
749
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
|
750
|
-
Enabled: true
|
751
|
-
|
752
|
-
Layout/MultilineOperationIndentation:
|
753
|
-
Description: >-
|
754
|
-
Checks indentation of binary operations that span more than
|
755
|
-
one line.
|
756
|
-
Enabled: true
|
757
|
-
|
758
|
-
Style/MultilineTernaryOperator:
|
759
|
-
Description: >-
|
760
|
-
Avoid multi-line ?: (the ternary operator);
|
761
|
-
use if/unless instead.
|
762
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
|
763
|
-
Enabled: true
|
764
|
-
|
765
|
-
Style/NegatedIf:
|
766
|
-
Description: >-
|
767
|
-
Favor unless over if for negative conditions
|
768
|
-
(or control flow or).
|
769
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
|
770
|
-
Enabled: false
|
771
|
-
|
772
|
-
Style/NegatedWhile:
|
773
|
-
Description: 'Favor until over while for negative conditions.'
|
774
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
|
775
|
-
Enabled: false
|
776
|
-
|
777
|
-
Style/NestedTernaryOperator:
|
778
|
-
Description: 'Use one expression per branch in a ternary operator.'
|
779
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
|
780
|
-
Enabled: true
|
781
|
-
|
782
|
-
Style/Next:
|
783
|
-
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
784
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
785
|
-
Enabled: true
|
786
|
-
|
787
|
-
Style/NilComparison:
|
788
|
-
Description: 'Prefer x.nil? to x == nil.'
|
789
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
#
|
795
|
-
#
|
796
|
-
#
|
797
|
-
#
|
798
|
-
#
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
-
|
943
|
-
|
944
|
-
|
945
|
-
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
#
|
1045
|
-
#
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
Layout/
|
1053
|
-
Description: '
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
Enabled: true
|
1095
|
-
|
1096
|
-
|
1097
|
-
Description: '
|
1098
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#
|
1099
|
-
Enabled: true
|
1100
|
-
|
1101
|
-
|
1102
|
-
Description:
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
#
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
#
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#
|
1166
|
-
Enabled: true
|
1167
|
-
|
1168
|
-
|
1169
|
-
Description: '
|
1170
|
-
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#
|
1171
|
-
Enabled: true
|
1172
|
-
|
1173
|
-
Style/
|
1174
|
-
Description:
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
Enabled: true
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
- rubocop-rails
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
DisabledByDefault: true
|
7
|
+
Exclude: []
|
8
|
+
|
9
|
+
#################### Lint ################################
|
10
|
+
|
11
|
+
Lint/AmbiguousOperator:
|
12
|
+
Description: >-
|
13
|
+
Checks for ambiguous operators in the first argument of a
|
14
|
+
method invocation without parentheses.
|
15
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
|
16
|
+
Enabled: true
|
17
|
+
|
18
|
+
Lint/AmbiguousRegexpLiteral:
|
19
|
+
Description: >-
|
20
|
+
Checks for ambiguous regexp literals in the first argument of
|
21
|
+
a method invocation without parenthesis.
|
22
|
+
Enabled: true
|
23
|
+
|
24
|
+
Lint/AssignmentInCondition:
|
25
|
+
Description: "Don't use assignment in conditions."
|
26
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
|
27
|
+
Enabled: true
|
28
|
+
|
29
|
+
Layout/BlockAlignment:
|
30
|
+
Description: 'Align block ends correctly.'
|
31
|
+
Enabled: true
|
32
|
+
|
33
|
+
Lint/CircularArgumentReference:
|
34
|
+
Description: "Don't refer to the keyword argument in the default value."
|
35
|
+
Enabled: true
|
36
|
+
|
37
|
+
Layout/ConditionPosition:
|
38
|
+
Description: >-
|
39
|
+
Checks for condition placed in a confusing position relative to
|
40
|
+
the keyword.
|
41
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
|
42
|
+
Enabled: true
|
43
|
+
|
44
|
+
Lint/Debugger:
|
45
|
+
Description: 'Check for debugger calls.'
|
46
|
+
Enabled: true
|
47
|
+
|
48
|
+
Layout/DefEndAlignment:
|
49
|
+
Description: 'Align ends corresponding to defs correctly.'
|
50
|
+
Enabled: true
|
51
|
+
|
52
|
+
Lint/DeprecatedClassMethods:
|
53
|
+
Description: 'Check for deprecated class method calls.'
|
54
|
+
Enabled: true
|
55
|
+
|
56
|
+
Lint/DuplicateMethods:
|
57
|
+
Description: 'Check for duplicate methods calls.'
|
58
|
+
Enabled: true
|
59
|
+
|
60
|
+
Lint/EachWithObjectArgument:
|
61
|
+
Description: 'Check for immutable argument given to each_with_object.'
|
62
|
+
Enabled: true
|
63
|
+
|
64
|
+
Lint/ElseLayout:
|
65
|
+
Description: 'Check for odd code arrangement in an else block.'
|
66
|
+
Enabled: true
|
67
|
+
|
68
|
+
Lint/EmptyEnsure:
|
69
|
+
Description: 'Checks for empty ensure block.'
|
70
|
+
Enabled: true
|
71
|
+
|
72
|
+
Lint/EmptyInterpolation:
|
73
|
+
Description: 'Checks for empty string interpolation.'
|
74
|
+
Enabled: true
|
75
|
+
|
76
|
+
Layout/EndAlignment:
|
77
|
+
Description: 'Align ends correctly.'
|
78
|
+
Enabled: true
|
79
|
+
|
80
|
+
Lint/EnsureReturn:
|
81
|
+
Description: 'Do not use return in an ensure block.'
|
82
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
|
83
|
+
Enabled: true
|
84
|
+
|
85
|
+
Security/Eval:
|
86
|
+
Description: 'The use of eval represents a serious security risk.'
|
87
|
+
Enabled: true
|
88
|
+
|
89
|
+
Lint/FormatParameterMismatch:
|
90
|
+
Description: 'The number of parameters to format/sprint must match the fields.'
|
91
|
+
Enabled: true
|
92
|
+
|
93
|
+
Lint/SuppressedException:
|
94
|
+
Description: "Don't suppress exception."
|
95
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
|
96
|
+
Enabled: true
|
97
|
+
|
98
|
+
Lint/LiteralInInterpolation:
|
99
|
+
Description: 'Checks for literals used in interpolation.'
|
100
|
+
Enabled: true
|
101
|
+
|
102
|
+
Lint/Loop:
|
103
|
+
Description: >-
|
104
|
+
Use Kernel#loop with break rather than begin/end/until or
|
105
|
+
begin/end/while for post-loop tests.
|
106
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
|
107
|
+
Enabled: true
|
108
|
+
|
109
|
+
Lint/NestedMethodDefinition:
|
110
|
+
Description: 'Do not use nested method definitions.'
|
111
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-methods'
|
112
|
+
Enabled: true
|
113
|
+
|
114
|
+
Lint/NonLocalExitFromIterator:
|
115
|
+
Description: 'Do not use return in iterator to cause non-local exit.'
|
116
|
+
Enabled: true
|
117
|
+
|
118
|
+
Lint/ParenthesesAsGroupedExpression:
|
119
|
+
Description: >-
|
120
|
+
Checks for method calls with a space before the opening
|
121
|
+
parenthesis.
|
122
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
123
|
+
Enabled: true
|
124
|
+
|
125
|
+
Lint/RequireParentheses:
|
126
|
+
Description: >-
|
127
|
+
Use parentheses in the method call to avoid confusion
|
128
|
+
about precedence.
|
129
|
+
Enabled: true
|
130
|
+
|
131
|
+
Lint/RescueException:
|
132
|
+
Description: 'Avoid rescuing the Exception class.'
|
133
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
|
134
|
+
Enabled: true
|
135
|
+
|
136
|
+
Lint/ShadowingOuterLocalVariable:
|
137
|
+
Description: >-
|
138
|
+
Do not use the same name as outer local variable
|
139
|
+
for block arguments or block local variables.
|
140
|
+
Enabled: true
|
141
|
+
|
142
|
+
Lint/RedundantStringCoercion:
|
143
|
+
Description: 'Checks for Object#to_s usage in string interpolation.'
|
144
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
|
145
|
+
Enabled: true
|
146
|
+
|
147
|
+
Lint/UnderscorePrefixedVariableName:
|
148
|
+
Description: 'Do not use prefix `_` for a variable that is used.'
|
149
|
+
Enabled: true
|
150
|
+
|
151
|
+
Lint/RedundantCopDisableDirective:
|
152
|
+
Description: >-
|
153
|
+
Checks for rubocop:disable comments that can be removed.
|
154
|
+
Note: this cop is not disabled when disabling all cops.
|
155
|
+
It must be explicitly disabled.
|
156
|
+
Enabled: true
|
157
|
+
|
158
|
+
Lint/UnusedBlockArgument:
|
159
|
+
Description: 'Checks for unused block arguments.'
|
160
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
161
|
+
Enabled: true
|
162
|
+
|
163
|
+
Lint/UnusedMethodArgument:
|
164
|
+
Description: 'Checks for unused method arguments.'
|
165
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
166
|
+
Enabled: true
|
167
|
+
|
168
|
+
Lint/UnreachableCode:
|
169
|
+
Description: 'Unreachable code.'
|
170
|
+
Enabled: true
|
171
|
+
|
172
|
+
Lint/UselessAccessModifier:
|
173
|
+
Description: 'Checks for useless access modifiers.'
|
174
|
+
Enabled: true
|
175
|
+
|
176
|
+
Lint/UselessAssignment:
|
177
|
+
Description: 'Checks for useless assignment to a local variable.'
|
178
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
|
179
|
+
Enabled: true
|
180
|
+
|
181
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
182
|
+
Description: 'This cop checks for places where binary operator has identical operands.'
|
183
|
+
Enabled: true
|
184
|
+
|
185
|
+
Lint/UselessElseWithoutRescue:
|
186
|
+
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
187
|
+
Enabled: true
|
188
|
+
|
189
|
+
Lint/UselessSetterCall:
|
190
|
+
Description: 'Checks for useless setter call to a local variable.'
|
191
|
+
Enabled: true
|
192
|
+
|
193
|
+
Lint/Void:
|
194
|
+
Description: 'Possible use of operator/literal/variable in void context.'
|
195
|
+
Enabled: true
|
196
|
+
|
197
|
+
###################### Metrics ####################################
|
198
|
+
|
199
|
+
Metrics/AbcSize:
|
200
|
+
Description: >-
|
201
|
+
A calculated magnitude based on number of assignments,
|
202
|
+
branches, and conditions.
|
203
|
+
Reference: 'http://c2.com/cgi/wiki?AbcMetric'
|
204
|
+
Enabled: true
|
205
|
+
Max: 25
|
206
|
+
|
207
|
+
Metrics/BlockNesting:
|
208
|
+
Description: 'Avoid excessive block nesting'
|
209
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
|
210
|
+
Enabled: true
|
211
|
+
Max: 4
|
212
|
+
|
213
|
+
Metrics/ClassLength:
|
214
|
+
Description: 'Avoid classes longer than 250 lines of code.'
|
215
|
+
Enabled: true
|
216
|
+
Max: 250
|
217
|
+
|
218
|
+
Metrics/CyclomaticComplexity:
|
219
|
+
Description: >-
|
220
|
+
A complexity metric that is strongly correlated to the number
|
221
|
+
of test cases needed to validate a method.
|
222
|
+
Enabled: true
|
223
|
+
|
224
|
+
Layout/LineLength:
|
225
|
+
Description: 'Limit lines to 120 characters.'
|
226
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
|
227
|
+
Max: 120
|
228
|
+
Enabled: true
|
229
|
+
Exclude:
|
230
|
+
- 'config/locales/**'
|
231
|
+
|
232
|
+
Metrics/MethodLength:
|
233
|
+
Description: 'Avoid methods longer than 30 lines of code.'
|
234
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
|
235
|
+
Enabled: true
|
236
|
+
Max: 30
|
237
|
+
|
238
|
+
Metrics/ModuleLength:
|
239
|
+
Description: 'Avoid modules longer than 250 lines of code.'
|
240
|
+
Enabled: true
|
241
|
+
Max: 250
|
242
|
+
|
243
|
+
Metrics/ParameterLists:
|
244
|
+
Description: 'Avoid parameter lists longer than three or four parameters.'
|
245
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
|
246
|
+
Enabled: true
|
247
|
+
|
248
|
+
Metrics/PerceivedComplexity:
|
249
|
+
Description: >-
|
250
|
+
A complexity metric geared towards measuring complexity for a
|
251
|
+
human reader.
|
252
|
+
Enabled: true
|
253
|
+
|
254
|
+
##################### Performance #############################
|
255
|
+
|
256
|
+
Performance/Count:
|
257
|
+
Description: >-
|
258
|
+
Use `count` instead of `select...size`, `reject...size`,
|
259
|
+
`select...count`, `reject...count`, `select...length`,
|
260
|
+
and `reject...length`.
|
261
|
+
Enabled: true
|
262
|
+
|
263
|
+
Performance/Detect:
|
264
|
+
Description: >-
|
265
|
+
Use `detect` instead of `select.first`, `find_all.first`,
|
266
|
+
`select.last`, and `find_all.last`.
|
267
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerabledetect-vs-enumerableselectfirst-code'
|
268
|
+
Enabled: true
|
269
|
+
|
270
|
+
Performance/FlatMap:
|
271
|
+
Description: >-
|
272
|
+
Use `Enumerable#flat_map`
|
273
|
+
instead of `Enumerable#map...Array#flatten(1)`
|
274
|
+
or `Enumberable#collect..Array#flatten(1)`
|
275
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablemaparrayflatten-vs-enumerableflat_map-code'
|
276
|
+
Enabled: true
|
277
|
+
EnabledForFlattenWithoutParams: false
|
278
|
+
# If enabled, this cop will warn about usages of
|
279
|
+
# `flatten` being called without any parameters.
|
280
|
+
# This can be dangerous since `flat_map` will only flatten 1 level, and
|
281
|
+
# `flatten` without any parameters can flatten multiple levels.
|
282
|
+
|
283
|
+
Performance/ReverseEach:
|
284
|
+
Description: 'Use `reverse_each` instead of `reverse.each`.'
|
285
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
|
286
|
+
Enabled: true
|
287
|
+
|
288
|
+
Style/Sample:
|
289
|
+
Description: >-
|
290
|
+
Use `sample` instead of `shuffle.first`,
|
291
|
+
`shuffle.last`, and `shuffle[Fixnum]`.
|
292
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arrayshufflefirst-vs-arraysample-code'
|
293
|
+
Enabled: true
|
294
|
+
|
295
|
+
Performance/Size:
|
296
|
+
Description: >-
|
297
|
+
Use `size` instead of `count` for counting
|
298
|
+
the number of elements in `Array` and `Hash`.
|
299
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
|
300
|
+
Enabled: true
|
301
|
+
|
302
|
+
Performance/StringReplacement:
|
303
|
+
Description: >-
|
304
|
+
Use `tr` instead of `gsub` when you are replacing the same
|
305
|
+
number of characters. Use `delete` instead of `gsub` when
|
306
|
+
you are deleting characters.
|
307
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#stringgsub-vs-stringtr-code'
|
308
|
+
Enabled: true
|
309
|
+
|
310
|
+
##################### Rails ##################################
|
311
|
+
|
312
|
+
Rails/ActionFilter:
|
313
|
+
Description: 'Enforces consistent use of action filter methods.'
|
314
|
+
Enabled: true
|
315
|
+
|
316
|
+
Rails/Date:
|
317
|
+
Description: >-
|
318
|
+
Checks the correct usage of date aware methods,
|
319
|
+
such as Date.today, Date.current etc.
|
320
|
+
Enabled: true
|
321
|
+
|
322
|
+
Rails/Delegate:
|
323
|
+
Description: 'Prefer delegate method for delegations.'
|
324
|
+
Enabled: true
|
325
|
+
|
326
|
+
Rails/FindBy:
|
327
|
+
Description: 'Prefer find_by over where.first.'
|
328
|
+
Enabled: true
|
329
|
+
|
330
|
+
Rails/FindEach:
|
331
|
+
Description: 'Prefer all.find_each over all.find.'
|
332
|
+
Enabled: true
|
333
|
+
|
334
|
+
Rails/HasAndBelongsToMany:
|
335
|
+
Description: 'Prefer has_many :through to has_and_belongs_to_many.'
|
336
|
+
Enabled: true
|
337
|
+
|
338
|
+
Rails/Output:
|
339
|
+
Description: 'Checks for calls to puts, print, etc.'
|
340
|
+
Enabled: true
|
341
|
+
|
342
|
+
Rails/ReadWriteAttribute:
|
343
|
+
Description: >-
|
344
|
+
Checks for read_attribute(:attr) and
|
345
|
+
write_attribute(:attr, val).
|
346
|
+
Enabled: true
|
347
|
+
|
348
|
+
Rails/ScopeArgs:
|
349
|
+
Description: 'Checks the arguments of ActiveRecord scopes.'
|
350
|
+
Enabled: true
|
351
|
+
|
352
|
+
Rails/TimeZone:
|
353
|
+
Description: 'Checks the correct usage of time zone aware methods.'
|
354
|
+
StyleGuide: 'https://github.com/bbatsov/rails-style-guide#time'
|
355
|
+
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
|
356
|
+
Enabled: false
|
357
|
+
|
358
|
+
Rails/Validation:
|
359
|
+
Description: 'Use validates :attribute, hash of validations.'
|
360
|
+
Enabled: true
|
361
|
+
|
362
|
+
################## Style #################################
|
363
|
+
|
364
|
+
Layout/AccessModifierIndentation:
|
365
|
+
Description: Check indentation of private/protected visibility modifiers.
|
366
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
|
367
|
+
Enabled: true
|
368
|
+
|
369
|
+
Naming/AccessorMethodName:
|
370
|
+
Description: Check the naming of accessor methods for get_/set_.
|
371
|
+
Enabled: false
|
372
|
+
|
373
|
+
Style/Alias:
|
374
|
+
Description: 'Use alias_method instead of alias.'
|
375
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
|
376
|
+
Enabled: true
|
377
|
+
|
378
|
+
Layout/ArrayAlignment:
|
379
|
+
Description: >-
|
380
|
+
Align the elements of an array literal if they span more than
|
381
|
+
one line.
|
382
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
|
383
|
+
Enabled: true
|
384
|
+
|
385
|
+
Layout/HashAlignment:
|
386
|
+
Description: >-
|
387
|
+
Align the elements of a hash literal if they span more than
|
388
|
+
one line.
|
389
|
+
EnforcedHashRocketStyle: table
|
390
|
+
Enabled: true
|
391
|
+
|
392
|
+
Layout/ParameterAlignment:
|
393
|
+
Description: >-
|
394
|
+
Align the parameters of a method call if they span more
|
395
|
+
than one line.
|
396
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
|
397
|
+
Enabled: true
|
398
|
+
|
399
|
+
Style/AndOr:
|
400
|
+
Description: 'Use &&/|| instead of and/or.'
|
401
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
|
402
|
+
Enabled: false
|
403
|
+
|
404
|
+
Style/ArrayJoin:
|
405
|
+
Description: 'Use Array#join instead of Array#*.'
|
406
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
|
407
|
+
Enabled: true
|
408
|
+
|
409
|
+
Style/AsciiComments:
|
410
|
+
Description: 'Use only ascii symbols in comments.'
|
411
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
|
412
|
+
Enabled: false
|
413
|
+
|
414
|
+
Naming/AsciiIdentifiers:
|
415
|
+
Description: 'Use only ascii symbols in identifiers.'
|
416
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
|
417
|
+
Enabled: true
|
418
|
+
|
419
|
+
Style/Attr:
|
420
|
+
Description: 'Checks for uses of Module#attr.'
|
421
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
|
422
|
+
Enabled: true
|
423
|
+
|
424
|
+
Style/BeginBlock:
|
425
|
+
Description: 'Avoid the use of BEGIN blocks.'
|
426
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
|
427
|
+
Enabled: true
|
428
|
+
|
429
|
+
Style/BarePercentLiterals:
|
430
|
+
Description: 'Checks if usage of %() or %Q() matches configuration.'
|
431
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
|
432
|
+
Enabled: true
|
433
|
+
|
434
|
+
Style/BlockComments:
|
435
|
+
Description: 'Do not use block comments.'
|
436
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
|
437
|
+
Enabled: true
|
438
|
+
|
439
|
+
Layout/BlockEndNewline:
|
440
|
+
Description: 'Put end statement of multiline block on its own line.'
|
441
|
+
Enabled: true
|
442
|
+
|
443
|
+
Style/BlockDelimiters:
|
444
|
+
Description: >-
|
445
|
+
Avoid using {...} for multi-line blocks (multiline chaining is
|
446
|
+
always ugly).
|
447
|
+
Prefer {...} over do...end for single-line blocks.
|
448
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
449
|
+
Enabled: true
|
450
|
+
|
451
|
+
Style/CaseEquality:
|
452
|
+
Description: 'Avoid explicit use of the case equality operator(===).'
|
453
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
|
454
|
+
Enabled: true
|
455
|
+
|
456
|
+
Layout/CaseIndentation:
|
457
|
+
Description: 'Indentation of when in a case/when/[else/]end.'
|
458
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
|
459
|
+
Enabled: true
|
460
|
+
|
461
|
+
Style/CharacterLiteral:
|
462
|
+
Description: 'Checks for uses of character literals.'
|
463
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
|
464
|
+
Enabled: true
|
465
|
+
|
466
|
+
Naming/ClassAndModuleCamelCase:
|
467
|
+
Description: 'Use CamelCase for classes and modules.'
|
468
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
|
469
|
+
Enabled: true
|
470
|
+
|
471
|
+
Style/ClassAndModuleChildren:
|
472
|
+
Description: 'Checks style of children classes and modules.'
|
473
|
+
Enabled: false
|
474
|
+
|
475
|
+
Style/ClassCheck:
|
476
|
+
Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
|
477
|
+
Enabled: true
|
478
|
+
|
479
|
+
Style/ClassMethods:
|
480
|
+
Description: 'Use self when defining module/class methods.'
|
481
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
|
482
|
+
Enabled: true
|
483
|
+
|
484
|
+
Style/ClassVars:
|
485
|
+
Description: 'Avoid the use of class variables.'
|
486
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
|
487
|
+
Enabled: true
|
488
|
+
|
489
|
+
Layout/ClosingParenthesisIndentation:
|
490
|
+
Description: 'Checks the indentation of hanging closing parentheses.'
|
491
|
+
Enabled: true
|
492
|
+
|
493
|
+
Style/ColonMethodCall:
|
494
|
+
Description: 'Do not use :: for method call.'
|
495
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
|
496
|
+
Enabled: true
|
497
|
+
|
498
|
+
Style/CommandLiteral:
|
499
|
+
Description: 'Use `` or %x around command literals.'
|
500
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
|
501
|
+
Enabled: true
|
502
|
+
|
503
|
+
Style/CommentAnnotation:
|
504
|
+
Description: 'Checks formatting of annotation comments.'
|
505
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
|
506
|
+
Enabled: true
|
507
|
+
|
508
|
+
Layout/CommentIndentation:
|
509
|
+
Description: 'Indentation of comments.'
|
510
|
+
Enabled: true
|
511
|
+
|
512
|
+
Naming/ConstantName:
|
513
|
+
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
|
514
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
|
515
|
+
Enabled: true
|
516
|
+
|
517
|
+
Style/DefWithParentheses:
|
518
|
+
Description: 'Use def with parentheses when there are arguments.'
|
519
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
520
|
+
Enabled: true
|
521
|
+
|
522
|
+
Style/PreferredHashMethods:
|
523
|
+
Description: 'Checks for use of deprecated Hash methods.'
|
524
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
|
525
|
+
Enabled: true
|
526
|
+
|
527
|
+
Style/Documentation:
|
528
|
+
Description: 'Document classes and non-namespace modules.'
|
529
|
+
Enabled: false
|
530
|
+
|
531
|
+
Layout/DotPosition:
|
532
|
+
Description: 'Checks the position of the dot in multi-line method calls.'
|
533
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
|
534
|
+
Enabled: true
|
535
|
+
|
536
|
+
Style/DoubleNegation:
|
537
|
+
Description: 'Checks for uses of double negation (!!).'
|
538
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
|
539
|
+
Enabled: true
|
540
|
+
|
541
|
+
Style/EachWithObject:
|
542
|
+
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
|
543
|
+
Enabled: true
|
544
|
+
|
545
|
+
Layout/ElseAlignment:
|
546
|
+
Description: 'Align elses and elsifs correctly.'
|
547
|
+
Enabled: true
|
548
|
+
|
549
|
+
Style/EmptyElse:
|
550
|
+
Description: 'Avoid empty else-clauses.'
|
551
|
+
Enabled: true
|
552
|
+
|
553
|
+
Layout/EmptyLineBetweenDefs:
|
554
|
+
Description: 'Use empty lines between defs.'
|
555
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
|
556
|
+
Enabled: true
|
557
|
+
|
558
|
+
Layout/EmptyLines:
|
559
|
+
Description: "Don't use several empty lines in a row."
|
560
|
+
Enabled: true
|
561
|
+
|
562
|
+
Layout/EmptyLinesAroundAccessModifier:
|
563
|
+
Description: "Keep blank lines around access modifiers."
|
564
|
+
Enabled: true
|
565
|
+
|
566
|
+
Layout/EmptyLinesAroundBlockBody:
|
567
|
+
Description: "Keeps track of empty lines around block bodies."
|
568
|
+
Enabled: true
|
569
|
+
|
570
|
+
Layout/EmptyLinesAroundClassBody:
|
571
|
+
Description: "Keeps track of empty lines around class bodies."
|
572
|
+
Enabled: true
|
573
|
+
|
574
|
+
Layout/EmptyLinesAroundModuleBody:
|
575
|
+
Description: "Keeps track of empty lines around module bodies."
|
576
|
+
Enabled: true
|
577
|
+
|
578
|
+
Layout/EmptyLinesAroundMethodBody:
|
579
|
+
Description: "Keeps track of empty lines around method bodies."
|
580
|
+
Enabled: true
|
581
|
+
|
582
|
+
Style/EmptyLiteral:
|
583
|
+
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
584
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
|
585
|
+
Enabled: true
|
586
|
+
|
587
|
+
Style/EndBlock:
|
588
|
+
Description: 'Avoid the use of END blocks.'
|
589
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
|
590
|
+
Enabled: true
|
591
|
+
|
592
|
+
Layout/EndOfLine:
|
593
|
+
Description: 'Use Unix-style line endings.'
|
594
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
|
595
|
+
Enabled: false
|
596
|
+
|
597
|
+
Style/EvenOdd:
|
598
|
+
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
|
599
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
600
|
+
Enabled: true
|
601
|
+
|
602
|
+
Layout/ExtraSpacing:
|
603
|
+
Description: 'Do not use unnecessary spacing.'
|
604
|
+
Enabled: true
|
605
|
+
|
606
|
+
Naming/FileName:
|
607
|
+
Description: 'Use snake_case for source file names.'
|
608
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
|
609
|
+
Enabled: true
|
610
|
+
|
611
|
+
Layout/InitialIndentation:
|
612
|
+
Description: >-
|
613
|
+
Checks the indentation of the first non-blank non-comment line in a file.
|
614
|
+
Enabled: true
|
615
|
+
|
616
|
+
Layout/FirstArgumentIndentation:
|
617
|
+
Description: 'Checks the indentation of the first parameter in a method call.'
|
618
|
+
Enabled: true
|
619
|
+
|
620
|
+
Lint/FlipFlop:
|
621
|
+
Description: 'Checks for flip flops'
|
622
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
|
623
|
+
Enabled: false
|
624
|
+
|
625
|
+
Style/For:
|
626
|
+
Description: 'Checks use of for or each in multiline loops.'
|
627
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
|
628
|
+
Enabled: true
|
629
|
+
|
630
|
+
Style/FormatString:
|
631
|
+
Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
|
632
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
|
633
|
+
EnforcedStyle: percent
|
634
|
+
Enabled: true
|
635
|
+
|
636
|
+
Style/FormatStringToken:
|
637
|
+
Enabled: false
|
638
|
+
|
639
|
+
Style/GlobalVars:
|
640
|
+
Description: 'Do not introduce global variables.'
|
641
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
|
642
|
+
Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
|
643
|
+
Enabled: true
|
644
|
+
|
645
|
+
Style/GuardClause:
|
646
|
+
Description: 'Check for conditionals that can be replaced with guard clauses'
|
647
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
648
|
+
Enabled: true
|
649
|
+
|
650
|
+
Style/HashSyntax:
|
651
|
+
Description: >-
|
652
|
+
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
|
653
|
+
{ :a => 1, :b => 2 }.
|
654
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
|
655
|
+
Enabled: true
|
656
|
+
|
657
|
+
Style/IfUnlessModifier:
|
658
|
+
Description: >-
|
659
|
+
Favor modifier if/unless usage when you have a
|
660
|
+
single-line body.
|
661
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
|
662
|
+
Enabled: true
|
663
|
+
|
664
|
+
Style/IfWithSemicolon:
|
665
|
+
Description: 'Do not use if x; .... Use the ternary operator instead.'
|
666
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
|
667
|
+
Enabled: true
|
668
|
+
|
669
|
+
Layout/IndentationConsistency:
|
670
|
+
Description: 'Keep indentation straight.'
|
671
|
+
Enabled: true
|
672
|
+
|
673
|
+
Layout/IndentationWidth:
|
674
|
+
Description: 'Use 2 spaces for indentation.'
|
675
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
676
|
+
Enabled: true
|
677
|
+
|
678
|
+
Layout/FirstArrayElementIndentation:
|
679
|
+
Description: >-
|
680
|
+
Checks the indentation of the first element in an array
|
681
|
+
literal.
|
682
|
+
EnforcedStyle: consistent
|
683
|
+
Enabled: true
|
684
|
+
|
685
|
+
Layout/FirstHashElementIndentation:
|
686
|
+
Description: 'Checks the indentation of the first key in a hash literal.'
|
687
|
+
EnforcedStyle: consistent
|
688
|
+
Enabled: true
|
689
|
+
|
690
|
+
Style/InfiniteLoop:
|
691
|
+
Description: 'Use Kernel#loop for infinite loops.'
|
692
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
|
693
|
+
Enabled: true
|
694
|
+
|
695
|
+
Style/Lambda:
|
696
|
+
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
697
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
|
698
|
+
Enabled: true
|
699
|
+
|
700
|
+
Style/LambdaCall:
|
701
|
+
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
702
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
|
703
|
+
Enabled: true
|
704
|
+
|
705
|
+
Layout/LeadingCommentSpace:
|
706
|
+
Description: 'Comments should start with a space.'
|
707
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
|
708
|
+
Enabled: true
|
709
|
+
|
710
|
+
Style/LineEndConcatenation:
|
711
|
+
Description: >-
|
712
|
+
Use \ instead of + or << to concatenate two string literals at
|
713
|
+
line end.
|
714
|
+
Enabled: true
|
715
|
+
|
716
|
+
Style/MethodCallWithoutArgsParentheses:
|
717
|
+
Description: 'Do not use parentheses for method calls with no arguments.'
|
718
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
|
719
|
+
Enabled: true
|
720
|
+
|
721
|
+
Style/MethodDefParentheses:
|
722
|
+
Description: >-
|
723
|
+
Checks if the method definitions have or don't have
|
724
|
+
parentheses.
|
725
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
|
726
|
+
Enabled: true
|
727
|
+
|
728
|
+
Naming/MethodName:
|
729
|
+
Description: 'Use the configured style when naming methods.'
|
730
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
|
731
|
+
Enabled: true
|
732
|
+
|
733
|
+
Style/ModuleFunction:
|
734
|
+
Description: 'Checks for usage of `extend self` in modules.'
|
735
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
|
736
|
+
Enabled: true
|
737
|
+
|
738
|
+
Style/MultilineBlockChain:
|
739
|
+
Description: 'Avoid multi-line chains of blocks.'
|
740
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
|
741
|
+
Enabled: true
|
742
|
+
|
743
|
+
Layout/MultilineBlockLayout:
|
744
|
+
Description: 'Ensures newlines after multiline block do statements.'
|
745
|
+
Enabled: true
|
746
|
+
|
747
|
+
Style/MultilineIfThen:
|
748
|
+
Description: 'Do not use then for multi-line if/unless.'
|
749
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
|
750
|
+
Enabled: true
|
751
|
+
|
752
|
+
Layout/MultilineOperationIndentation:
|
753
|
+
Description: >-
|
754
|
+
Checks indentation of binary operations that span more than
|
755
|
+
one line.
|
756
|
+
Enabled: true
|
757
|
+
|
758
|
+
Style/MultilineTernaryOperator:
|
759
|
+
Description: >-
|
760
|
+
Avoid multi-line ?: (the ternary operator);
|
761
|
+
use if/unless instead.
|
762
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
|
763
|
+
Enabled: true
|
764
|
+
|
765
|
+
Style/NegatedIf:
|
766
|
+
Description: >-
|
767
|
+
Favor unless over if for negative conditions
|
768
|
+
(or control flow or).
|
769
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
|
770
|
+
Enabled: false
|
771
|
+
|
772
|
+
Style/NegatedWhile:
|
773
|
+
Description: 'Favor until over while for negative conditions.'
|
774
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
|
775
|
+
Enabled: false
|
776
|
+
|
777
|
+
Style/NestedTernaryOperator:
|
778
|
+
Description: 'Use one expression per branch in a ternary operator.'
|
779
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
|
780
|
+
Enabled: true
|
781
|
+
|
782
|
+
Style/Next:
|
783
|
+
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
784
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
|
785
|
+
Enabled: true
|
786
|
+
|
787
|
+
Style/NilComparison:
|
788
|
+
Description: 'Prefer x.nil? to x == nil.'
|
789
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
|
790
|
+
EnforcedStyle: comparison
|
791
|
+
Enabled: true
|
792
|
+
|
793
|
+
Style/NonNilCheck:
|
794
|
+
# With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
|
795
|
+
# `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
|
796
|
+
# **usually** OK, but might change behavior.
|
797
|
+
#
|
798
|
+
# With `IncludeSemanticChanges` set to `false`, this cop does not report
|
799
|
+
# offenses for `!x.nil?` and does no changes that might change behavior.
|
800
|
+
Description: 'Checks for redundant nil checks.'
|
801
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
|
802
|
+
IncludeSemanticChanges: true
|
803
|
+
Enabled: false
|
804
|
+
|
805
|
+
Style/Not:
|
806
|
+
Description: 'Use ! instead of not.'
|
807
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
|
808
|
+
Enabled: false
|
809
|
+
|
810
|
+
Style/NumericLiterals:
|
811
|
+
Description: >-
|
812
|
+
Add underscores to large numeric literals to improve their
|
813
|
+
readability.
|
814
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
|
815
|
+
Enabled: true
|
816
|
+
|
817
|
+
Style/OneLineConditional:
|
818
|
+
Description: >-
|
819
|
+
Favor the ternary operator(?:) over
|
820
|
+
if/then/else/end constructs.
|
821
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
|
822
|
+
Enabled: true
|
823
|
+
|
824
|
+
Naming/BinaryOperatorParameterName:
|
825
|
+
Description: 'When defining binary operators, name the argument other.'
|
826
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
|
827
|
+
Enabled: true
|
828
|
+
|
829
|
+
Style/OptionalArguments:
|
830
|
+
Description: >-
|
831
|
+
Checks for optional arguments that do not appear at the end
|
832
|
+
of the argument list
|
833
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
|
834
|
+
Enabled: true
|
835
|
+
|
836
|
+
Style/ParallelAssignment:
|
837
|
+
Description: >-
|
838
|
+
Check for simple usages of parallel assignment.
|
839
|
+
It will only warn when the number of variables
|
840
|
+
matches on both sides of the assignment.
|
841
|
+
This also provides performance benefits
|
842
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
|
843
|
+
Enabled: true
|
844
|
+
|
845
|
+
Style/ParenthesesAroundCondition:
|
846
|
+
Description: >-
|
847
|
+
Don't use parentheses around the condition of an
|
848
|
+
if/unless/while.
|
849
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
|
850
|
+
Enabled: true
|
851
|
+
|
852
|
+
Style/PercentLiteralDelimiters:
|
853
|
+
Description: 'Use `%`-literal delimiters consistently'
|
854
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
|
855
|
+
Enabled: true
|
856
|
+
|
857
|
+
Style/PercentQLiterals:
|
858
|
+
Description: 'Checks if uses of %Q/%q match the configured preference.'
|
859
|
+
Enabled: true
|
860
|
+
|
861
|
+
Style/PerlBackrefs:
|
862
|
+
Description: 'Avoid Perl-style regex back references.'
|
863
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
|
864
|
+
Enabled: false
|
865
|
+
|
866
|
+
Naming/PredicateName:
|
867
|
+
Description: 'Check the names of predicate methods.'
|
868
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
|
869
|
+
Enabled: true
|
870
|
+
|
871
|
+
Style/Proc:
|
872
|
+
Description: 'Use proc instead of Proc.new.'
|
873
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
|
874
|
+
Enabled: true
|
875
|
+
|
876
|
+
Style/RaiseArgs:
|
877
|
+
Description: 'Checks the arguments passed to raise/fail.'
|
878
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
|
879
|
+
Enabled: true
|
880
|
+
|
881
|
+
Style/RedundantBegin:
|
882
|
+
Description: "Don't use begin blocks when they are not needed."
|
883
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
|
884
|
+
Enabled: true
|
885
|
+
|
886
|
+
Style/RedundantException:
|
887
|
+
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
|
888
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
|
889
|
+
Enabled: true
|
890
|
+
|
891
|
+
Style/RedundantReturn:
|
892
|
+
Description: "Don't use return where it's not required."
|
893
|
+
# When `true` allows code like `return x, y`.
|
894
|
+
AllowMultipleReturnValues: false
|
895
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
|
896
|
+
Enabled: false
|
897
|
+
|
898
|
+
Style/RedundantSelf:
|
899
|
+
Description: "Don't use self where it's not needed."
|
900
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
|
901
|
+
Enabled: true
|
902
|
+
|
903
|
+
Style/RegexpLiteral:
|
904
|
+
Description: 'Use / or %r around regular expressions.'
|
905
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
|
906
|
+
EnforcedStyle: slashes
|
907
|
+
AllowInnerSlashes: false
|
908
|
+
Enabled: true
|
909
|
+
|
910
|
+
Layout/RescueEnsureAlignment:
|
911
|
+
Description: 'Align rescues and ensures correctly.'
|
912
|
+
Enabled: true
|
913
|
+
|
914
|
+
Style/RescueModifier:
|
915
|
+
Description: 'Avoid using rescue in its modifier form.'
|
916
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
|
917
|
+
Enabled: true
|
918
|
+
|
919
|
+
Style/SelfAssignment:
|
920
|
+
Description: >-
|
921
|
+
Checks for places where self-assignment shorthand should have
|
922
|
+
been used.
|
923
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
|
924
|
+
Enabled: true
|
925
|
+
|
926
|
+
Style/Semicolon:
|
927
|
+
Description: "Don't use semicolons to terminate expressions."
|
928
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
|
929
|
+
Enabled: true
|
930
|
+
|
931
|
+
Style/SignalException:
|
932
|
+
Description: 'Checks for proper usage of fail and raise.'
|
933
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
|
934
|
+
EnforcedStyle: semantic
|
935
|
+
Enabled: true
|
936
|
+
|
937
|
+
Style/SingleLineBlockParams:
|
938
|
+
Description: 'Enforces the names of some block params.'
|
939
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
|
940
|
+
Methods:
|
941
|
+
- reduce:
|
942
|
+
- sum
|
943
|
+
- v
|
944
|
+
- inject:
|
945
|
+
- sum
|
946
|
+
- v
|
947
|
+
Enabled: true
|
948
|
+
|
949
|
+
Style/SingleLineMethods:
|
950
|
+
Description: 'Avoid single-line methods.'
|
951
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
|
952
|
+
Enabled: true
|
953
|
+
|
954
|
+
Layout/SpaceBeforeFirstArg:
|
955
|
+
Description: >-
|
956
|
+
Checks that exactly one space is used between a method name
|
957
|
+
and the first argument for method calls without parentheses.
|
958
|
+
Enabled: true
|
959
|
+
|
960
|
+
Layout/SpaceAfterColon:
|
961
|
+
Description: 'Use spaces after colons.'
|
962
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
963
|
+
Enabled: true
|
964
|
+
|
965
|
+
Layout/SpaceAfterComma:
|
966
|
+
Description: 'Use spaces after commas.'
|
967
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
968
|
+
Enabled: true
|
969
|
+
|
970
|
+
Layout/SpaceAroundKeyword:
|
971
|
+
Description: 'Use spaces around keywords.'
|
972
|
+
Enabled: true
|
973
|
+
|
974
|
+
Layout/SpaceAfterMethodName:
|
975
|
+
Description: >-
|
976
|
+
Do not put a space between a method name and the opening
|
977
|
+
parenthesis in a method definition.
|
978
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
|
979
|
+
Enabled: true
|
980
|
+
|
981
|
+
Layout/SpaceAfterNot:
|
982
|
+
Description: Tracks redundant space after the ! operator.
|
983
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
|
984
|
+
Enabled: true
|
985
|
+
|
986
|
+
Layout/SpaceAfterSemicolon:
|
987
|
+
Description: 'Use spaces after semicolons.'
|
988
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
989
|
+
Enabled: true
|
990
|
+
|
991
|
+
Layout/SpaceBeforeBlockBraces:
|
992
|
+
Description: >-
|
993
|
+
Checks that the left block brace has or doesn't have space
|
994
|
+
before it.
|
995
|
+
EnforcedStyle: no_space
|
996
|
+
Enabled: true
|
997
|
+
|
998
|
+
Layout/SpaceBeforeComma:
|
999
|
+
Description: 'No spaces before commas.'
|
1000
|
+
Enabled: true
|
1001
|
+
|
1002
|
+
Layout/SpaceBeforeComment:
|
1003
|
+
Description: >-
|
1004
|
+
Checks for missing space between code and a comment on the
|
1005
|
+
same line.
|
1006
|
+
Enabled: true
|
1007
|
+
|
1008
|
+
Layout/SpaceBeforeSemicolon:
|
1009
|
+
Description: 'No spaces before semicolons.'
|
1010
|
+
Enabled: false
|
1011
|
+
|
1012
|
+
Layout/SpaceInsideBlockBraces:
|
1013
|
+
Description: >-
|
1014
|
+
Checks that block braces have or don't have surrounding space.
|
1015
|
+
For blocks taking parameters, checks that the left brace has
|
1016
|
+
or doesn't have trailing space.
|
1017
|
+
SpaceBeforeBlockParameters: false
|
1018
|
+
Enabled: true
|
1019
|
+
|
1020
|
+
Layout/SpaceAroundBlockParameters:
|
1021
|
+
Description: 'Checks the spacing inside and after block parameters pipes.'
|
1022
|
+
Enabled: true
|
1023
|
+
|
1024
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
1025
|
+
Description: >-
|
1026
|
+
Checks that the equals signs in parameter default assignments
|
1027
|
+
have or don't have surrounding space depending on
|
1028
|
+
configuration.
|
1029
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
|
1030
|
+
Enabled: true
|
1031
|
+
|
1032
|
+
Layout/SpaceAroundOperators:
|
1033
|
+
Description: 'Use a single space around operators.'
|
1034
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
1035
|
+
Enabled: true
|
1036
|
+
|
1037
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
1038
|
+
Description: 'Checks the spacing inside array literal brackets.'
|
1039
|
+
Enabled: true
|
1040
|
+
EnforcedStyle: no_space
|
1041
|
+
SupportedStyles:
|
1042
|
+
- space
|
1043
|
+
- no_space
|
1044
|
+
# 'compact' normally requires a space inside the brackets, with the exception
|
1045
|
+
# that successive left brackets or right brackets are collapsed together
|
1046
|
+
- compact
|
1047
|
+
EnforcedStyleForEmptyBrackets: no_space
|
1048
|
+
SupportedStylesForEmptyBrackets:
|
1049
|
+
- space
|
1050
|
+
- no_space
|
1051
|
+
|
1052
|
+
Layout/SpaceInsideReferenceBrackets:
|
1053
|
+
Description: 'Checks the spacing inside referential brackets.'
|
1054
|
+
Enabled: true
|
1055
|
+
EnforcedStyle: no_space
|
1056
|
+
SupportedStyles:
|
1057
|
+
- space
|
1058
|
+
- no_space
|
1059
|
+
EnforcedStyleForEmptyBrackets: no_space
|
1060
|
+
SupportedStylesForEmptyBrackets:
|
1061
|
+
- space
|
1062
|
+
- no_space
|
1063
|
+
|
1064
|
+
Layout/SpaceInsideHashLiteralBraces:
|
1065
|
+
Description: "Use spaces inside hash literal braces - or don't."
|
1066
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
|
1067
|
+
# SupportedStyles:
|
1068
|
+
# - space
|
1069
|
+
# - no_space
|
1070
|
+
# # 'compact' normally requires a space inside hash braces, with the exception
|
1071
|
+
# # that successive left braces or right braces are collapsed together
|
1072
|
+
# - compact
|
1073
|
+
EnforcedStyle: compact
|
1074
|
+
Enabled: true
|
1075
|
+
|
1076
|
+
Layout/SpaceInsideParens:
|
1077
|
+
Description: 'No spaces after ( or before ).'
|
1078
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
|
1079
|
+
Enabled: true
|
1080
|
+
|
1081
|
+
Layout/SpaceInsideRangeLiteral:
|
1082
|
+
Description: 'No spaces inside range literals.'
|
1083
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
|
1084
|
+
Enabled: true
|
1085
|
+
|
1086
|
+
Layout/SpaceInsideStringInterpolation:
|
1087
|
+
Description: 'Checks for padding/surrounding spaces inside string interpolation.'
|
1088
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
|
1089
|
+
Enabled: true
|
1090
|
+
|
1091
|
+
Style/SpecialGlobalVars:
|
1092
|
+
Description: 'Avoid Perl-style global variables.'
|
1093
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
|
1094
|
+
Enabled: true
|
1095
|
+
|
1096
|
+
Style/StringLiterals:
|
1097
|
+
Description: 'Checks if uses of quotes match the configured preference.'
|
1098
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
|
1099
|
+
Enabled: true
|
1100
|
+
|
1101
|
+
Style/StringLiteralsInInterpolation:
|
1102
|
+
Description: >-
|
1103
|
+
Checks if uses of quotes inside expressions in interpolated
|
1104
|
+
strings match the configured preference.
|
1105
|
+
Enabled: true
|
1106
|
+
|
1107
|
+
Style/StructInheritance:
|
1108
|
+
Description: 'Checks for inheritance from Struct.new.'
|
1109
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
|
1110
|
+
Enabled: true
|
1111
|
+
|
1112
|
+
Style/SymbolLiteral:
|
1113
|
+
Description: 'Use plain symbols instead of string symbols when possible.'
|
1114
|
+
Enabled: true
|
1115
|
+
|
1116
|
+
Style/SymbolProc:
|
1117
|
+
Description: 'Use symbols as procs instead of blocks when possible.'
|
1118
|
+
Enabled: true
|
1119
|
+
|
1120
|
+
Layout/IndentationStyle:
|
1121
|
+
Description: 'No hard tabs.'
|
1122
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
|
1123
|
+
Enabled: true
|
1124
|
+
|
1125
|
+
Layout/TrailingEmptyLines:
|
1126
|
+
Description: 'Checks trailing blank lines and final newline.'
|
1127
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
|
1128
|
+
Enabled: true
|
1129
|
+
|
1130
|
+
Style/TrailingCommaInArguments:
|
1131
|
+
# If `comma`, the cop requires a comma after the last argument, but only for
|
1132
|
+
# parenthesized method calls where each argument is on its own line.
|
1133
|
+
# If `comma_for_multiple_args`, the cop behaves like `comma` except when
|
1134
|
+
# there's only one argument, in which case it requires that there's no
|
1135
|
+
# trailing comma.
|
1136
|
+
# If `consistent_comma`, the cop requires a comma after the last argument,
|
1137
|
+
# for all parenthesized method calls with arguments.
|
1138
|
+
Description: 'Checks for trailing comma in parameter lists.'
|
1139
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
|
1140
|
+
EnforcedStyleForMultiline: comma
|
1141
|
+
Enabled: true
|
1142
|
+
|
1143
|
+
Style/TrailingCommaInArrayLiteral:
|
1144
|
+
Description: 'Checks for trailing comma in array literals.'
|
1145
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
1146
|
+
EnforcedStyleForMultiline: comma
|
1147
|
+
SupportedStylesForMultiline:
|
1148
|
+
- comma
|
1149
|
+
- consistent_comma
|
1150
|
+
- no_comma
|
1151
|
+
Enabled: true
|
1152
|
+
|
1153
|
+
Style/TrailingCommaInHashLiteral:
|
1154
|
+
Description: 'Checks for trailing comma in hash literals.'
|
1155
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
|
1156
|
+
EnforcedStyleForMultiline: comma
|
1157
|
+
SupportedStylesForMultiline:
|
1158
|
+
- comma
|
1159
|
+
- consistent_comma
|
1160
|
+
- no_comma
|
1161
|
+
Enabled: true
|
1162
|
+
|
1163
|
+
Layout/TrailingWhitespace:
|
1164
|
+
Description: 'Avoid trailing whitespace.'
|
1165
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
|
1166
|
+
Enabled: true
|
1167
|
+
|
1168
|
+
Style/TrivialAccessors:
|
1169
|
+
Description: 'Prefer attr_* methods to trivial readers/writers.'
|
1170
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
|
1171
|
+
Enabled: true
|
1172
|
+
|
1173
|
+
Style/UnlessElse:
|
1174
|
+
Description: >-
|
1175
|
+
Do not use unless with else. Rewrite these with the positive
|
1176
|
+
case first.
|
1177
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
|
1178
|
+
Enabled: true
|
1179
|
+
|
1180
|
+
Style/RedundantCapitalW:
|
1181
|
+
Description: 'Checks for %W when interpolation is not needed.'
|
1182
|
+
Enabled: true
|
1183
|
+
|
1184
|
+
Style/RedundantPercentQ:
|
1185
|
+
Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
|
1186
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
|
1187
|
+
Enabled: true
|
1188
|
+
|
1189
|
+
Style/TrailingUnderscoreVariable:
|
1190
|
+
Description: >-
|
1191
|
+
Checks for the usage of unneeded trailing underscores at the
|
1192
|
+
end of parallel variable assignment.
|
1193
|
+
Enabled: true
|
1194
|
+
|
1195
|
+
Style/VariableInterpolation:
|
1196
|
+
Description: >-
|
1197
|
+
Don't interpolate global, instance and class variables
|
1198
|
+
directly in strings.
|
1199
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
|
1200
|
+
Enabled: true
|
1201
|
+
|
1202
|
+
Naming/VariableName:
|
1203
|
+
Description: 'Use the configured style when naming variables.'
|
1204
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
|
1205
|
+
Enabled: true
|
1206
|
+
|
1207
|
+
Style/WhenThen:
|
1208
|
+
Description: 'Use when x then ... for one-line cases.'
|
1209
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
|
1210
|
+
Enabled: false
|
1211
|
+
|
1212
|
+
Style/WhileUntilDo:
|
1213
|
+
Description: 'Checks for redundant do after while or until.'
|
1214
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
|
1215
|
+
Enabled: true
|
1216
|
+
|
1217
|
+
Style/WhileUntilModifier:
|
1218
|
+
Description: >-
|
1219
|
+
Favor modifier while/until usage when you have a
|
1220
|
+
single-line body.
|
1221
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
|
1222
|
+
Enabled: true
|
1223
|
+
|
1224
|
+
Style/WordArray:
|
1225
|
+
Description: 'Use %w or %W for arrays of words.'
|
1226
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
|
1227
|
+
Enabled: true
|