atomically 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 053a70728eaf97d497e01c5eb97d28b8606a13f6
4
+ data.tar.gz: d19a6e6f011e0fa73f8ed40a6f48fc514d426c16
5
+ SHA512:
6
+ metadata.gz: 642a937243e5e133294cfc5d97be7201cad09041717ff13ec512f8f23d4fc128d18dfd78d25d4130d0c0526655ccd232b25ada2decf284b1e55ece0c990b2dea
7
+ data.tar.gz: 247cbb367d404627ab799af68f35de8dd2294e0a7b1d585c061e8b5d4a25ae5691af646577a51dd8a9b1e696304b1cd784ddc45773c7ec55acb74529d1e7fd77
@@ -0,0 +1,50 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ ## Specific to RubyMotion:
17
+ .dat*
18
+ .repl_history
19
+ build/
20
+ *.bridgesupport
21
+ build-iPhoneOS/
22
+ build-iPhoneSimulator/
23
+
24
+ ## Specific to RubyMotion (use of CocoaPods):
25
+ #
26
+ # We recommend against adding the Pods directory to your .gitignore. However
27
+ # you should judge for yourself, the pros and cons are mentioned at:
28
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
+ #
30
+ # vendor/Pods/
31
+
32
+ ## Documentation cache and generated files:
33
+ /.yardoc/
34
+ /_yardoc/
35
+ /doc/
36
+ /rdoc/
37
+
38
+ ## Environment normalization:
39
+ /.bundle/
40
+ /vendor/bundle
41
+ /lib/bundler/man/
42
+
43
+ # for a library or gem, you might want to ignore these files since the code is
44
+ # intended to run in multiple environments; otherwise, check them in:
45
+ # Gemfile.lock
46
+ # .ruby-version
47
+ # .ruby-gemset
48
+
49
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50
+ .rvmrc
@@ -0,0 +1,1225 @@
1
+ AllCops:
2
+ DisabledByDefault: true
3
+ Exclude: []
4
+
5
+ #################### Lint ################################
6
+
7
+ Lint/AmbiguousOperator:
8
+ Description: >-
9
+ Checks for ambiguous operators in the first argument of a
10
+ method invocation without parentheses.
11
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
12
+ Enabled: true
13
+
14
+ Lint/AmbiguousRegexpLiteral:
15
+ Description: >-
16
+ Checks for ambiguous regexp literals in the first argument of
17
+ a method invocation without parenthesis.
18
+ Enabled: true
19
+
20
+ Lint/AssignmentInCondition:
21
+ Description: "Don't use assignment in conditions."
22
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
23
+ Enabled: true
24
+
25
+ Layout/BlockAlignment:
26
+ Description: 'Align block ends correctly.'
27
+ Enabled: true
28
+
29
+ Lint/CircularArgumentReference:
30
+ Description: "Don't refer to the keyword argument in the default value."
31
+ Enabled: true
32
+
33
+ Layout/ConditionPosition:
34
+ Description: >-
35
+ Checks for condition placed in a confusing position relative to
36
+ the keyword.
37
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
38
+ Enabled: true
39
+
40
+ Lint/Debugger:
41
+ Description: 'Check for debugger calls.'
42
+ Enabled: true
43
+
44
+ Layout/DefEndAlignment:
45
+ Description: 'Align ends corresponding to defs correctly.'
46
+ Enabled: true
47
+
48
+ Lint/DeprecatedClassMethods:
49
+ Description: 'Check for deprecated class method calls.'
50
+ Enabled: true
51
+
52
+ Lint/DuplicateMethods:
53
+ Description: 'Check for duplicate methods calls.'
54
+ Enabled: true
55
+
56
+ Lint/EachWithObjectArgument:
57
+ Description: 'Check for immutable argument given to each_with_object.'
58
+ Enabled: true
59
+
60
+ Lint/ElseLayout:
61
+ Description: 'Check for odd code arrangement in an else block.'
62
+ Enabled: true
63
+
64
+ Lint/EmptyEnsure:
65
+ Description: 'Checks for empty ensure block.'
66
+ Enabled: true
67
+
68
+ Lint/EmptyInterpolation:
69
+ Description: 'Checks for empty string interpolation.'
70
+ Enabled: true
71
+
72
+ Layout/EndAlignment:
73
+ Description: 'Align ends correctly.'
74
+ Enabled: true
75
+
76
+ Lint/EndInMethod:
77
+ Description: 'END blocks should not be placed inside method definitions.'
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/HandleExceptions:
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/StringConversionInInterpolation:
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/UnneededCopDisableDirective:
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/UselessComparison:
182
+ Description: 'Checks for comparison of something with itself.'
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
+ Metrics/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
+ Performance/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: true
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/AlignArray:
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/AlignHash:
386
+ Description: >-
387
+ Align the elements of a hash literal if they span more than
388
+ one line.
389
+ Enabled: true
390
+
391
+ Layout/AlignParameters:
392
+ Description: >-
393
+ Align the parameters of a method call if they span more
394
+ than one line.
395
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
396
+ Enabled: true
397
+
398
+ Style/AndOr:
399
+ Description: 'Use &&/|| instead of and/or.'
400
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
401
+ Enabled: false
402
+
403
+ Style/ArrayJoin:
404
+ Description: 'Use Array#join instead of Array#*.'
405
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
406
+ Enabled: true
407
+
408
+ Style/AsciiComments:
409
+ Description: 'Use only ascii symbols in comments.'
410
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
411
+ Enabled: false
412
+
413
+ Naming/AsciiIdentifiers:
414
+ Description: 'Use only ascii symbols in identifiers.'
415
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
416
+ Enabled: true
417
+
418
+ Style/Attr:
419
+ Description: 'Checks for uses of Module#attr.'
420
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
421
+ Enabled: true
422
+
423
+ Style/BeginBlock:
424
+ Description: 'Avoid the use of BEGIN blocks.'
425
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
426
+ Enabled: true
427
+
428
+ Style/BarePercentLiterals:
429
+ Description: 'Checks if usage of %() or %Q() matches configuration.'
430
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
431
+ Enabled: true
432
+
433
+ Style/BlockComments:
434
+ Description: 'Do not use block comments.'
435
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
436
+ Enabled: true
437
+
438
+ Layout/BlockEndNewline:
439
+ Description: 'Put end statement of multiline block on its own line.'
440
+ Enabled: true
441
+
442
+ Style/BlockDelimiters:
443
+ Description: >-
444
+ Avoid using {...} for multi-line blocks (multiline chaining is
445
+ always ugly).
446
+ Prefer {...} over do...end for single-line blocks.
447
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
448
+ Enabled: true
449
+
450
+ Style/BracesAroundHashParameters:
451
+ Description: 'Enforce braces style around hash parameters.'
452
+ Enabled: true
453
+
454
+ Style/CaseEquality:
455
+ Description: 'Avoid explicit use of the case equality operator(===).'
456
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
457
+ Enabled: true
458
+
459
+ Layout/CaseIndentation:
460
+ Description: 'Indentation of when in a case/when/[else/]end.'
461
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
462
+ Enabled: true
463
+
464
+ Style/CharacterLiteral:
465
+ Description: 'Checks for uses of character literals.'
466
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
467
+ Enabled: true
468
+
469
+ Naming/ClassAndModuleCamelCase:
470
+ Description: 'Use CamelCase for classes and modules.'
471
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
472
+ Enabled: true
473
+
474
+ Style/ClassAndModuleChildren:
475
+ Description: 'Checks style of children classes and modules.'
476
+ Enabled: false
477
+
478
+ Style/ClassCheck:
479
+ Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
480
+ Enabled: true
481
+
482
+ Style/ClassMethods:
483
+ Description: 'Use self when defining module/class methods.'
484
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-class-methods'
485
+ Enabled: true
486
+
487
+ Style/ClassVars:
488
+ Description: 'Avoid the use of class variables.'
489
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
490
+ Enabled: true
491
+
492
+ Layout/ClosingParenthesisIndentation:
493
+ Description: 'Checks the indentation of hanging closing parentheses.'
494
+ Enabled: true
495
+
496
+ Style/ColonMethodCall:
497
+ Description: 'Do not use :: for method call.'
498
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
499
+ Enabled: true
500
+
501
+ Style/CommandLiteral:
502
+ Description: 'Use `` or %x around command literals.'
503
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
504
+ Enabled: true
505
+
506
+ Style/CommentAnnotation:
507
+ Description: 'Checks formatting of annotation comments.'
508
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
509
+ Enabled: true
510
+
511
+ Layout/CommentIndentation:
512
+ Description: 'Indentation of comments.'
513
+ Enabled: true
514
+
515
+ Naming/ConstantName:
516
+ Description: 'Constants should use SCREAMING_SNAKE_CASE.'
517
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
518
+ Enabled: true
519
+
520
+ Style/DefWithParentheses:
521
+ Description: 'Use def with parentheses when there are arguments.'
522
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
523
+ Enabled: true
524
+
525
+ Style/PreferredHashMethods:
526
+ Description: 'Checks for use of deprecated Hash methods.'
527
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
528
+ Enabled: true
529
+
530
+ Style/Documentation:
531
+ Description: 'Document classes and non-namespace modules.'
532
+ Enabled: false
533
+
534
+ Layout/DotPosition:
535
+ Description: 'Checks the position of the dot in multi-line method calls.'
536
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
537
+ Enabled: true
538
+
539
+ Style/DoubleNegation:
540
+ Description: 'Checks for uses of double negation (!!).'
541
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
542
+ Enabled: true
543
+
544
+ Style/EachWithObject:
545
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
546
+ Enabled: true
547
+
548
+ Layout/ElseAlignment:
549
+ Description: 'Align elses and elsifs correctly.'
550
+ Enabled: true
551
+
552
+ Style/EmptyElse:
553
+ Description: 'Avoid empty else-clauses.'
554
+ Enabled: true
555
+
556
+ Layout/EmptyLineBetweenDefs:
557
+ Description: 'Use empty lines between defs.'
558
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
559
+ Enabled: true
560
+
561
+ Layout/EmptyLines:
562
+ Description: "Don't use several empty lines in a row."
563
+ Enabled: true
564
+
565
+ Layout/EmptyLinesAroundAccessModifier:
566
+ Description: "Keep blank lines around access modifiers."
567
+ Enabled: true
568
+
569
+ Layout/EmptyLinesAroundBlockBody:
570
+ Description: "Keeps track of empty lines around block bodies."
571
+ Enabled: true
572
+
573
+ Layout/EmptyLinesAroundClassBody:
574
+ Description: "Keeps track of empty lines around class bodies."
575
+ Enabled: true
576
+
577
+ Layout/EmptyLinesAroundModuleBody:
578
+ Description: "Keeps track of empty lines around module bodies."
579
+ Enabled: true
580
+
581
+ Layout/EmptyLinesAroundMethodBody:
582
+ Description: "Keeps track of empty lines around method bodies."
583
+ Enabled: true
584
+
585
+ Style/EmptyLiteral:
586
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
587
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
588
+ Enabled: true
589
+
590
+ Style/EndBlock:
591
+ Description: 'Avoid the use of END blocks.'
592
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
593
+ Enabled: true
594
+
595
+ Layout/EndOfLine:
596
+ Description: 'Use Unix-style line endings.'
597
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
598
+ Enabled: true
599
+
600
+ Style/EvenOdd:
601
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
602
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
603
+ Enabled: true
604
+
605
+ Layout/ExtraSpacing:
606
+ Description: 'Do not use unnecessary spacing.'
607
+ Enabled: true
608
+
609
+ Naming/FileName:
610
+ Description: 'Use snake_case for source file names.'
611
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
612
+ Enabled: true
613
+
614
+ Layout/InitialIndentation:
615
+ Description: >-
616
+ Checks the indentation of the first non-blank non-comment line in a file.
617
+ Enabled: true
618
+
619
+ Layout/FirstParameterIndentation:
620
+ Description: 'Checks the indentation of the first parameter in a method call.'
621
+ Enabled: true
622
+
623
+ Style/FlipFlop:
624
+ Description: 'Checks for flip flops'
625
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
626
+ Enabled: true
627
+
628
+ Style/For:
629
+ Description: 'Checks use of for or each in multiline loops.'
630
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
631
+ Enabled: true
632
+
633
+ Style/FormatString:
634
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
635
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
636
+ EnforcedStyle: sprintf
637
+ Enabled: true
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/IndentArray:
679
+ Description: >-
680
+ Checks the indentation of the first element in an array
681
+ literal.
682
+ EnforcedStyle: consistent
683
+ Enabled: true
684
+
685
+ Layout/IndentHash:
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
+ Enabled: false
791
+
792
+ Style/NonNilCheck:
793
+ # With `IncludeSemanticChanges` set to `true`, this cop reports offenses for
794
+ # `!x.nil?` and autocorrects that and `x != nil` to solely `x`, which is
795
+ # **usually** OK, but might change behavior.
796
+ #
797
+ # With `IncludeSemanticChanges` set to `false`, this cop does not report
798
+ # offenses for `!x.nil?` and does no changes that might change behavior.
799
+ Description: 'Checks for redundant nil checks.'
800
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
801
+ IncludeSemanticChanges: true
802
+ Enabled: true
803
+
804
+ Style/Not:
805
+ Description: 'Use ! instead of not.'
806
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
807
+ Enabled: false
808
+
809
+ Style/NumericLiterals:
810
+ Description: >-
811
+ Add underscores to large numeric literals to improve their
812
+ readability.
813
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
814
+ Enabled: true
815
+
816
+ Style/OneLineConditional:
817
+ Description: >-
818
+ Favor the ternary operator(?:) over
819
+ if/then/else/end constructs.
820
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
821
+ Enabled: true
822
+
823
+ Naming/BinaryOperatorParameterName:
824
+ Description: 'When defining binary operators, name the argument other.'
825
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
826
+ Enabled: true
827
+
828
+ Style/OptionalArguments:
829
+ Description: >-
830
+ Checks for optional arguments that do not appear at the end
831
+ of the argument list
832
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#optional-arguments'
833
+ Enabled: true
834
+
835
+ Style/ParallelAssignment:
836
+ Description: >-
837
+ Check for simple usages of parallel assignment.
838
+ It will only warn when the number of variables
839
+ matches on both sides of the assignment.
840
+ This also provides performance benefits
841
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parallel-assignment'
842
+ Enabled: true
843
+
844
+ Style/ParenthesesAroundCondition:
845
+ Description: >-
846
+ Don't use parentheses around the condition of an
847
+ if/unless/while.
848
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
849
+ Enabled: true
850
+
851
+ Style/PercentLiteralDelimiters:
852
+ Description: 'Use `%`-literal delimiters consistently'
853
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
854
+ Enabled: true
855
+
856
+ Style/PercentQLiterals:
857
+ Description: 'Checks if uses of %Q/%q match the configured preference.'
858
+ Enabled: true
859
+
860
+ Style/PerlBackrefs:
861
+ Description: 'Avoid Perl-style regex back references.'
862
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
863
+ Enabled: true
864
+
865
+ Naming/PredicateName:
866
+ Description: 'Check the names of predicate methods.'
867
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
868
+ Enabled: true
869
+
870
+ Style/Proc:
871
+ Description: 'Use proc instead of Proc.new.'
872
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
873
+ Enabled: true
874
+
875
+ Style/RaiseArgs:
876
+ Description: 'Checks the arguments passed to raise/fail.'
877
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
878
+ Enabled: true
879
+
880
+ Style/RedundantBegin:
881
+ Description: "Don't use begin blocks when they are not needed."
882
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
883
+ Enabled: true
884
+
885
+ Style/RedundantException:
886
+ Description: "Checks for an obsolete RuntimeException argument in raise/fail."
887
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
888
+ Enabled: true
889
+
890
+ Style/RedundantReturn:
891
+ Description: "Don't use return where it's not required."
892
+ # When `true` allows code like `return x, y`.
893
+ AllowMultipleReturnValues: false
894
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
895
+ Enabled: false
896
+
897
+ Style/RedundantSelf:
898
+ Description: "Don't use self where it's not needed."
899
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
900
+ Enabled: true
901
+
902
+ Style/RegexpLiteral:
903
+ Description: 'Use / or %r around regular expressions.'
904
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
905
+ EnforcedStyle: slashes
906
+ AllowInnerSlashes: true
907
+ Enabled: true
908
+
909
+ Layout/RescueEnsureAlignment:
910
+ Description: 'Align rescues and ensures correctly.'
911
+ Enabled: true
912
+
913
+ Style/RescueModifier:
914
+ Description: 'Avoid using rescue in its modifier form.'
915
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
916
+ Enabled: true
917
+
918
+ Style/SelfAssignment:
919
+ Description: >-
920
+ Checks for places where self-assignment shorthand should have
921
+ been used.
922
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
923
+ Enabled: true
924
+
925
+ Style/Semicolon:
926
+ Description: "Don't use semicolons to terminate expressions."
927
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
928
+ Enabled: true
929
+
930
+ Style/SignalException:
931
+ Description: 'Checks for proper usage of fail and raise.'
932
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
933
+ EnforcedStyle: semantic
934
+ Enabled: true
935
+
936
+ Style/SingleLineBlockParams:
937
+ Description: 'Enforces the names of some block params.'
938
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
939
+ Methods:
940
+ - reduce:
941
+ - acc
942
+ - elem
943
+ - inject:
944
+ - acc
945
+ - elem
946
+ Enabled: true
947
+
948
+ Style/SingleLineMethods:
949
+ Description: 'Avoid single-line methods.'
950
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
951
+ Enabled: true
952
+
953
+ Layout/SpaceBeforeFirstArg:
954
+ Description: >-
955
+ Checks that exactly one space is used between a method name
956
+ and the first argument for method calls without parentheses.
957
+ Enabled: true
958
+
959
+ Layout/SpaceAfterColon:
960
+ Description: 'Use spaces after colons.'
961
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
962
+ Enabled: true
963
+
964
+ Layout/SpaceAfterComma:
965
+ Description: 'Use spaces after commas.'
966
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
967
+ Enabled: true
968
+
969
+ Layout/SpaceAroundKeyword:
970
+ Description: 'Use spaces around keywords.'
971
+ Enabled: true
972
+
973
+ Layout/SpaceAfterMethodName:
974
+ Description: >-
975
+ Do not put a space between a method name and the opening
976
+ parenthesis in a method definition.
977
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
978
+ Enabled: true
979
+
980
+ Layout/SpaceAfterNot:
981
+ Description: Tracks redundant space after the ! operator.
982
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
983
+ Enabled: true
984
+
985
+ Layout/SpaceAfterSemicolon:
986
+ Description: 'Use spaces after semicolons.'
987
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
988
+ Enabled: true
989
+
990
+ Layout/SpaceBeforeBlockBraces:
991
+ Description: >-
992
+ Checks that the left block brace has or doesn't have space
993
+ before it.
994
+ EnforcedStyle: no_space
995
+ Enabled: true
996
+
997
+ Layout/SpaceBeforeComma:
998
+ Description: 'No spaces before commas.'
999
+ Enabled: true
1000
+
1001
+ Layout/SpaceBeforeComment:
1002
+ Description: >-
1003
+ Checks for missing space between code and a comment on the
1004
+ same line.
1005
+ Enabled: true
1006
+
1007
+ Layout/SpaceBeforeSemicolon:
1008
+ Description: 'No spaces before semicolons.'
1009
+ Enabled: false
1010
+
1011
+ Layout/SpaceInsideBlockBraces:
1012
+ Description: >-
1013
+ Checks that block braces have or don't have surrounding space.
1014
+ For blocks taking parameters, checks that the left brace has
1015
+ or doesn't have trailing space.
1016
+ Enabled: false
1017
+
1018
+ Layout/SpaceAroundBlockParameters:
1019
+ Description: 'Checks the spacing inside and after block parameters pipes.'
1020
+ Enabled: true
1021
+
1022
+ Layout/SpaceAroundEqualsInParameterDefault:
1023
+ Description: >-
1024
+ Checks that the equals signs in parameter default assignments
1025
+ have or don't have surrounding space depending on
1026
+ configuration.
1027
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
1028
+ Enabled: true
1029
+
1030
+ Layout/SpaceAroundOperators:
1031
+ Description: 'Use a single space around operators.'
1032
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1033
+ Enabled: true
1034
+
1035
+ Layout/SpaceInsideArrayLiteralBrackets:
1036
+ Description: 'Checks the spacing inside array literal brackets.'
1037
+ Enabled: true
1038
+ EnforcedStyle: no_space
1039
+ SupportedStyles:
1040
+ - space
1041
+ - no_space
1042
+ # 'compact' normally requires a space inside the brackets, with the exception
1043
+ # that successive left brackets or right brackets are collapsed together
1044
+ - compact
1045
+ EnforcedStyleForEmptyBrackets: no_space
1046
+ SupportedStylesForEmptyBrackets:
1047
+ - space
1048
+ - no_space
1049
+
1050
+ Layout/SpaceInsideReferenceBrackets:
1051
+ Description: 'Checks the spacing inside referential brackets.'
1052
+ Enabled: true
1053
+ EnforcedStyle: no_space
1054
+ SupportedStyles:
1055
+ - space
1056
+ - no_space
1057
+ EnforcedStyleForEmptyBrackets: no_space
1058
+ SupportedStylesForEmptyBrackets:
1059
+ - space
1060
+ - no_space
1061
+
1062
+ Layout/SpaceInsideHashLiteralBraces:
1063
+ Description: "Use spaces inside hash literal braces - or don't."
1064
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
1065
+ # SupportedStyles:
1066
+ # - space
1067
+ # - no_space
1068
+ # # 'compact' normally requires a space inside hash braces, with the exception
1069
+ # # that successive left braces or right braces are collapsed together
1070
+ # - compact
1071
+ EnforcedStyle: compact
1072
+ Enabled: true
1073
+
1074
+ Layout/SpaceInsideParens:
1075
+ Description: 'No spaces after ( or before ).'
1076
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
1077
+ Enabled: true
1078
+
1079
+ Layout/SpaceInsideRangeLiteral:
1080
+ Description: 'No spaces inside range literals.'
1081
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
1082
+ Enabled: true
1083
+
1084
+ Layout/SpaceInsideStringInterpolation:
1085
+ Description: 'Checks for padding/surrounding spaces inside string interpolation.'
1086
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#string-interpolation'
1087
+ Enabled: true
1088
+
1089
+ Style/SpecialGlobalVars:
1090
+ Description: 'Avoid Perl-style global variables.'
1091
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
1092
+ Enabled: true
1093
+
1094
+ Style/StringLiterals:
1095
+ Description: 'Checks if uses of quotes match the configured preference.'
1096
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
1097
+ Enabled: true
1098
+
1099
+ Style/StringLiteralsInInterpolation:
1100
+ Description: >-
1101
+ Checks if uses of quotes inside expressions in interpolated
1102
+ strings match the configured preference.
1103
+ Enabled: true
1104
+
1105
+ Style/StructInheritance:
1106
+ Description: 'Checks for inheritance from Struct.new.'
1107
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
1108
+ Enabled: true
1109
+
1110
+ Style/SymbolLiteral:
1111
+ Description: 'Use plain symbols instead of string symbols when possible.'
1112
+ Enabled: true
1113
+
1114
+ Style/SymbolProc:
1115
+ Description: 'Use symbols as procs instead of blocks when possible.'
1116
+ Enabled: true
1117
+
1118
+ Layout/Tab:
1119
+ Description: 'No hard tabs.'
1120
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
1121
+ Enabled: true
1122
+
1123
+ Layout/TrailingBlankLines:
1124
+ Description: 'Checks trailing blank lines and final newline.'
1125
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
1126
+ Enabled: true
1127
+
1128
+ Style/TrailingCommaInArguments:
1129
+ # If `comma`, the cop requires a comma after the last argument, but only for
1130
+ # parenthesized method calls where each argument is on its own line.
1131
+ # If `comma_for_multiple_args`, the cop behaves like `comma` except when
1132
+ # there's only one argument, in which case it requires that there's no
1133
+ # trailing comma.
1134
+ # If `consistent_comma`, the cop requires a comma after the last argument,
1135
+ # for all parenthesized method calls with arguments.
1136
+ Description: 'Checks for trailing comma in parameter lists.'
1137
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-params-comma'
1138
+ EnforcedStyleForMultiline: comma
1139
+ Enabled: true
1140
+
1141
+ Style/TrailingCommaInArrayLiteral:
1142
+ Description: 'Checks for trailing comma in array literals.'
1143
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
1144
+ EnforcedStyleForMultiline: comma
1145
+ SupportedStylesForMultiline:
1146
+ - comma
1147
+ - consistent_comma
1148
+ - no_comma
1149
+ Enabled: true
1150
+
1151
+ Style/TrailingCommaInHashLiteral:
1152
+ Description: 'Checks for trailing comma in hash literals.'
1153
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
1154
+ EnforcedStyleForMultiline: comma
1155
+ SupportedStylesForMultiline:
1156
+ - comma
1157
+ - consistent_comma
1158
+ - no_comma
1159
+ Enabled: true
1160
+
1161
+ Layout/TrailingWhitespace:
1162
+ Description: 'Avoid trailing whitespace.'
1163
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
1164
+ Enabled: true
1165
+
1166
+ Style/TrivialAccessors:
1167
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
1168
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
1169
+ Enabled: true
1170
+
1171
+ Style/UnlessElse:
1172
+ Description: >-
1173
+ Do not use unless with else. Rewrite these with the positive
1174
+ case first.
1175
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
1176
+ Enabled: true
1177
+
1178
+ Style/UnneededCapitalW:
1179
+ Description: 'Checks for %W when interpolation is not needed.'
1180
+ Enabled: true
1181
+
1182
+ Style/UnneededPercentQ:
1183
+ Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
1184
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
1185
+ Enabled: true
1186
+
1187
+ Style/TrailingUnderscoreVariable:
1188
+ Description: >-
1189
+ Checks for the usage of unneeded trailing underscores at the
1190
+ end of parallel variable assignment.
1191
+ Enabled: true
1192
+
1193
+ Style/VariableInterpolation:
1194
+ Description: >-
1195
+ Don't interpolate global, instance and class variables
1196
+ directly in strings.
1197
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
1198
+ Enabled: true
1199
+
1200
+ Naming/VariableName:
1201
+ Description: 'Use the configured style when naming variables.'
1202
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
1203
+ Enabled: true
1204
+
1205
+ Style/WhenThen:
1206
+ Description: 'Use when x then ... for one-line cases.'
1207
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
1208
+ Enabled: false
1209
+
1210
+ Style/WhileUntilDo:
1211
+ Description: 'Checks for redundant do after while or until.'
1212
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
1213
+ Enabled: true
1214
+
1215
+ Style/WhileUntilModifier:
1216
+ Description: >-
1217
+ Favor modifier while/until usage when you have a
1218
+ single-line body.
1219
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
1220
+ Enabled: true
1221
+
1222
+ Style/WordArray:
1223
+ Description: 'Use %w or %W for arrays of words.'
1224
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
1225
+ Enabled: true