multi_range 0.0.3 → 1.3.0

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