pusher-rubocop 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,30 @@
1
+ # These are all the cops that are disabled in the default configuration.
2
+
3
+ Style/CollectionMethods:
4
+ Description: 'Preferred collection methods.'
5
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size'
6
+ Enabled: false
7
+
8
+ Style/Encoding:
9
+ Description: 'Use UTF-8 as the source file encoding.'
10
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#utf-8'
11
+ Enabled: false
12
+
13
+ Style/InlineComment:
14
+ Description: 'Avoid inline comments.'
15
+ Enabled: false
16
+
17
+ Style/MethodCalledOnDoEndBlock:
18
+ Description: 'Avoid chaining a method call on a do...end block.'
19
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
20
+ Enabled: false
21
+
22
+ Style/SymbolArray:
23
+ Description: 'Use %i or %I for arrays of symbols.'
24
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-i'
25
+ Enabled: false
26
+
27
+ Style/ExtraSpacing:
28
+ Description: 'Do not use unnecessary spacing.'
29
+ Enabled: false
30
+
@@ -0,0 +1,1006 @@
1
+ # These are all the cops that are enabled in the default configuration.
2
+
3
+ Style/AccessModifierIndentation:
4
+ Description: Check indentation of private/protected visibility modifiers.
5
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected'
6
+ Enabled: true
7
+
8
+ Style/AccessorMethodName:
9
+ Description: Check the naming of accessor methods for get_/set_.
10
+ Enabled: true
11
+
12
+ Style/Alias:
13
+ Description: 'Use alias_method instead of alias.'
14
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#alias-method'
15
+ Enabled: true
16
+
17
+ Style/AlignArray:
18
+ Description: >-
19
+ Align the elements of an array literal if they span more than
20
+ one line.
21
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#align-multiline-arrays'
22
+ Enabled: true
23
+
24
+ Style/AlignHash:
25
+ Description: >-
26
+ Align the elements of a hash literal if they span more than
27
+ one line.
28
+ Enabled: true
29
+
30
+ Style/AlignParameters:
31
+ Description: >-
32
+ Align the parameters of a method call if they span more
33
+ than one line.
34
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
35
+ Enabled: true
36
+
37
+ Style/AndOr:
38
+ Description: 'Use &&/|| instead of and/or.'
39
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-and-or-or'
40
+ Enabled: true
41
+
42
+ Style/ArrayJoin:
43
+ Description: 'Use Array#join instead of Array#*.'
44
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#array-join'
45
+ Enabled: true
46
+
47
+ Style/AsciiComments:
48
+ Description: 'Use only ascii symbols in comments.'
49
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
50
+ Enabled: true
51
+
52
+ Style/AsciiIdentifiers:
53
+ Description: 'Use only ascii symbols in identifiers.'
54
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
55
+ Enabled: true
56
+
57
+ Style/Attr:
58
+ Description: 'Checks for uses of Module#attr.'
59
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr'
60
+ Enabled: true
61
+
62
+ Style/BeginBlock:
63
+ Description: 'Avoid the use of BEGIN blocks.'
64
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-BEGIN-blocks'
65
+ Enabled: true
66
+
67
+ Style/BarePercentLiterals:
68
+ Description: 'Checks if usage of %() or %Q() matches configuration.'
69
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q-shorthand'
70
+ Enabled: true
71
+
72
+ Style/BlockComments:
73
+ Description: 'Do not use block comments.'
74
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-block-comments'
75
+ Enabled: true
76
+
77
+ Style/BlockEndNewline:
78
+ Description: 'Put end statement of multiline block on its own line.'
79
+ Enabled: true
80
+
81
+ Style/Blocks:
82
+ Description: >-
83
+ Avoid using {...} for multi-line blocks (multiline chaining is
84
+ always ugly).
85
+ Prefer {...} over do...end for single-line blocks.
86
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
87
+ Enabled: true
88
+
89
+ Style/BracesAroundHashParameters:
90
+ Description: 'Enforce braces style around hash parameters.'
91
+ Enabled: true
92
+
93
+ Style/CaseEquality:
94
+ Description: 'Avoid explicit use of the case equality operator(===).'
95
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-case-equality'
96
+ Enabled: true
97
+
98
+ Style/CaseIndentation:
99
+ Description: 'Indentation of when in a case/when/[else/]end.'
100
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#indent-when-to-case'
101
+ Enabled: true
102
+
103
+ Style/CharacterLiteral:
104
+ Description: 'Checks for uses of character literals.'
105
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-character-literals'
106
+ Enabled: true
107
+
108
+ Style/ClassAndModuleCamelCase:
109
+ Description: 'Use CamelCase for classes and modules.'
110
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#camelcase-classes'
111
+ Enabled: true
112
+
113
+ Style/ClassAndModuleChildren:
114
+ Description: 'Checks style of children classes and modules.'
115
+ Enabled: true
116
+
117
+ Style/ClassCheck:
118
+ Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
119
+ Enabled: true
120
+
121
+ Style/ClassMethods:
122
+ Description: 'Use self when defining module/class methods.'
123
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#def-self-singletons'
124
+ Enabled: true
125
+
126
+ Style/ClassVars:
127
+ Description: 'Avoid the use of class variables.'
128
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-class-vars'
129
+ Enabled: true
130
+
131
+ Style/ColonMethodCall:
132
+ Description: 'Do not use :: for method call.'
133
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#double-colons'
134
+ Enabled: true
135
+
136
+ Style/CommentAnnotation:
137
+ Description: >-
138
+ Checks formatting of special comments
139
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
140
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#annotate-keywords'
141
+ Enabled: true
142
+
143
+ Style/CommentIndentation:
144
+ Description: 'Indentation of comments.'
145
+ Enabled: true
146
+
147
+ Style/ConstantName:
148
+ Description: 'Constants should use SCREAMING_SNAKE_CASE.'
149
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#screaming-snake-case'
150
+ Enabled: true
151
+
152
+ Style/DefWithParentheses:
153
+ Description: 'Use def with parentheses when there are arguments.'
154
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
155
+ Enabled: true
156
+
157
+ Style/DeprecatedHashMethods:
158
+ Description: 'Checks for use of deprecated Hash methods.'
159
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
160
+ Enabled: true
161
+
162
+ Style/Documentation:
163
+ Description: 'Document classes and non-namespace modules.'
164
+ Enabled: true
165
+
166
+ Style/DotPosition:
167
+ Description: 'Checks the position of the dot in multi-line method calls.'
168
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
169
+ Enabled: true
170
+
171
+ Style/DoubleNegation:
172
+ Description: 'Checks for uses of double negation (!!).'
173
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
174
+ Enabled: true
175
+
176
+ Style/EachWithObject:
177
+ Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
178
+ Enabled: true
179
+
180
+ Style/ElseAlignment:
181
+ Description: 'Align elses and elsifs correctly.'
182
+ Enabled: true
183
+
184
+ Style/EmptyElse:
185
+ Description: 'Avoid empty else-clauses.'
186
+ Enabled: true
187
+
188
+ Style/EmptyLineBetweenDefs:
189
+ Description: 'Use empty lines between defs.'
190
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#empty-lines-between-methods'
191
+ Enabled: true
192
+
193
+ Style/EmptyLines:
194
+ Description: "Don't use several empty lines in a row."
195
+ Enabled: true
196
+
197
+ Style/EmptyLinesAroundAccessModifier:
198
+ Description: "Keep blank lines around access modifiers."
199
+ Enabled: true
200
+
201
+ Style/EmptyLinesAroundBlockBody:
202
+ Description: "Keeps track of empty lines around block bodies."
203
+ Enabled: true
204
+
205
+ Style/EmptyLinesAroundClassBody:
206
+ Description: "Keeps track of empty lines around class bodies."
207
+ Enabled: true
208
+
209
+ Style/EmptyLinesAroundModuleBody:
210
+ Description: "Keeps track of empty lines around module bodies."
211
+ Enabled: true
212
+
213
+ Style/EmptyLinesAroundMethodBody:
214
+ Description: "Keeps track of empty lines around method bodies."
215
+ Enabled: true
216
+
217
+ Style/EmptyLiteral:
218
+ Description: 'Prefer literals to Array.new/Hash.new/String.new.'
219
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#literal-array-hash'
220
+ Enabled: true
221
+
222
+ Style/EndBlock:
223
+ Description: 'Avoid the use of END blocks.'
224
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-END-blocks'
225
+ Enabled: true
226
+
227
+ Style/EndOfLine:
228
+ Description: 'Use Unix-style line endings.'
229
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#crlf'
230
+ Enabled: true
231
+
232
+ Style/EvenOdd:
233
+ Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
234
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
235
+ Enabled: true
236
+
237
+ Style/FileName:
238
+ Description: 'Use snake_case for source file names.'
239
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
240
+ Enabled: true
241
+
242
+ Style/FirstParameterIndentation:
243
+ Description: 'Checks the indentation of the first parameter in a method call.'
244
+ Enabled: true
245
+
246
+ Style/FlipFlop:
247
+ Description: 'Checks for flip flops'
248
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
249
+ Enabled: true
250
+
251
+ Style/For:
252
+ Description: 'Checks use of for or each in multiline loops.'
253
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-for-loops'
254
+ Enabled: true
255
+
256
+ Style/FormatString:
257
+ Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
258
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#sprintf'
259
+ Enabled: true
260
+
261
+ Style/GlobalVars:
262
+ Description: 'Do not introduce global variables.'
263
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#instance-vars'
264
+ Enabled: true
265
+
266
+ Style/GuardClause:
267
+ Description: 'Check for conditionals that can be replaced with guard clauses'
268
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
269
+ Enabled: true
270
+
271
+ Style/HashSyntax:
272
+ Description: >-
273
+ Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
274
+ { :a => 1, :b => 2 }.
275
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-literals'
276
+ Enabled: true
277
+
278
+ Style/IfUnlessModifier:
279
+ Description: >-
280
+ Favor modifier if/unless usage when you have a
281
+ single-line body.
282
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier'
283
+ Enabled: true
284
+
285
+ Style/IfWithSemicolon:
286
+ Description: 'Do not use if x; .... Use the ternary operator instead.'
287
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon-ifs'
288
+ Enabled: true
289
+
290
+ Style/IndentationConsistency:
291
+ Description: 'Keep indentation straight.'
292
+ Enabled: true
293
+
294
+ Style/IndentationWidth:
295
+ Description: 'Use 2 spaces for indentation.'
296
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
297
+ Enabled: true
298
+
299
+ Style/IndentArray:
300
+ Description: >-
301
+ Checks the indentation of the first element in an array
302
+ literal.
303
+ Enabled: true
304
+
305
+ Style/IndentHash:
306
+ Description: 'Checks the indentation of the first key in a hash literal.'
307
+ Enabled: true
308
+
309
+ Style/InfiniteLoop:
310
+ Description: 'Use Kernel#loop for infinite loops.'
311
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#infinite-loop'
312
+ Enabled: true
313
+
314
+ Style/Lambda:
315
+ Description: 'Use the new lambda literal syntax for single-line blocks.'
316
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#lambda-multi-line'
317
+ Enabled: true
318
+
319
+ Style/LambdaCall:
320
+ Description: 'Use lambda.call(...) instead of lambda.(...).'
321
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc-call'
322
+ Enabled: true
323
+
324
+ Style/LeadingCommentSpace:
325
+ Description: 'Comments should start with a space.'
326
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space'
327
+ Enabled: true
328
+
329
+ Style/LineEndConcatenation:
330
+ Description: >-
331
+ Use \ instead of + or << to concatenate two string literals at
332
+ line end.
333
+ Enabled: true
334
+
335
+ Style/MethodCallParentheses:
336
+ Description: 'Do not use parentheses for method calls with no arguments.'
337
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-args-no-parens'
338
+ Enabled: true
339
+
340
+ Style/MethodDefParentheses:
341
+ Description: >-
342
+ Checks if the method definitions have or don't have
343
+ parentheses.
344
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#method-parens'
345
+ Enabled: true
346
+
347
+ Style/MethodName:
348
+ Description: 'Use the configured style when naming methods.'
349
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
350
+ Enabled: true
351
+
352
+ Style/ModuleFunction:
353
+ Description: 'Checks for usage of `extend self` in modules.'
354
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
355
+ Enabled: true
356
+
357
+ Style/MultilineBlockChain:
358
+ Description: 'Avoid multi-line chains of blocks.'
359
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
360
+ Enabled: true
361
+
362
+ Style/MultilineBlockLayout:
363
+ Description: 'Ensures newlines after multiline block do statements.'
364
+ Enabled: true
365
+
366
+ Style/MultilineIfThen:
367
+ Description: 'Do not use then for multi-line if/unless.'
368
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-then'
369
+ Enabled: true
370
+
371
+ Style/MultilineOperationIndentation:
372
+ Description: >-
373
+ Checks indentation of binary operations that span more than
374
+ one line.
375
+ Enabled: true
376
+
377
+ Style/MultilineTernaryOperator:
378
+ Description: >-
379
+ Avoid multi-line ?: (the ternary operator);
380
+ use if/unless instead.
381
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary'
382
+ Enabled: true
383
+
384
+ Style/NegatedIf:
385
+ Description: >-
386
+ Favor unless over if for negative conditions
387
+ (or control flow or).
388
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
389
+ Enabled: true
390
+
391
+ Style/NegatedWhile:
392
+ Description: 'Favor until over while for negative conditions.'
393
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#until-for-negatives'
394
+ Enabled: true
395
+
396
+ Style/NestedTernaryOperator:
397
+ Description: 'Use one expression per branch in a ternary operator.'
398
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-ternary'
399
+ Enabled: true
400
+
401
+ Style/Next:
402
+ Description: 'Use `next` to skip iteration instead of a condition at the end.'
403
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals'
404
+ Enabled: true
405
+
406
+ Style/NilComparison:
407
+ Description: 'Prefer x.nil? to x == nil.'
408
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
409
+ Enabled: true
410
+
411
+ Style/NonNilCheck:
412
+ Description: 'Checks for redundant nil checks.'
413
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-non-nil-checks'
414
+ Enabled: true
415
+
416
+ Style/Not:
417
+ Description: 'Use ! instead of not.'
418
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bang-not-not'
419
+ Enabled: true
420
+
421
+ Style/NumericLiterals:
422
+ Description: >-
423
+ Add underscores to large numeric literals to improve their
424
+ readability.
425
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics'
426
+ Enabled: true
427
+
428
+ Style/OneLineConditional:
429
+ Description: >-
430
+ Favor the ternary operator(?:) over
431
+ if/then/else/end constructs.
432
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
433
+ Enabled: true
434
+
435
+ Style/OpMethod:
436
+ Description: 'When defining binary operators, name the argument other.'
437
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
438
+ Enabled: true
439
+
440
+ Style/ParenthesesAroundCondition:
441
+ Description: >-
442
+ Don't use parentheses around the condition of an
443
+ if/unless/while.
444
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-parens-if'
445
+ Enabled: true
446
+
447
+ Style/PercentLiteralDelimiters:
448
+ Description: 'Use `%`-literal delimiters consistently'
449
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-literal-braces'
450
+ Enabled: true
451
+
452
+ Style/PercentQLiterals:
453
+ Description: 'Checks if uses of %Q/%q match the configured preference.'
454
+ Enabled: true
455
+
456
+ Style/PerlBackrefs:
457
+ Description: 'Avoid Perl-style regex back references.'
458
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
459
+ Enabled: true
460
+
461
+ Style/PredicateName:
462
+ Description: 'Check the names of predicate methods.'
463
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
464
+ Enabled: true
465
+
466
+ Style/Proc:
467
+ Description: 'Use proc instead of Proc.new.'
468
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#proc'
469
+ Enabled: true
470
+
471
+ Style/RaiseArgs:
472
+ Description: 'Checks the arguments passed to raise/fail.'
473
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#exception-class-messages'
474
+ Enabled: true
475
+
476
+ Style/RedundantBegin:
477
+ Description: "Don't use begin blocks when they are not needed."
478
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#begin-implicit'
479
+ Enabled: true
480
+
481
+ Style/RedundantException:
482
+ Description: "Checks for an obsolete RuntimeException argument in raise/fail."
483
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-runtimeerror'
484
+ Enabled: true
485
+
486
+ Style/RedundantReturn:
487
+ Description: "Don't use return where it's not required."
488
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-explicit-return'
489
+ Enabled: true
490
+
491
+ Style/RedundantSelf:
492
+ Description: "Don't use self where it's not needed."
493
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-self-unless-required'
494
+ Enabled: true
495
+
496
+ Style/RegexpLiteral:
497
+ Description: >-
498
+ Use %r for regular expressions matching more than
499
+ `MaxSlashes` '/' characters.
500
+ Use %r only for regular expressions matching more than
501
+ `MaxSlashes` '/' character.
502
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-r'
503
+ Enabled: true
504
+
505
+ Style/RescueModifier:
506
+ Description: 'Avoid using rescue in its modifier form.'
507
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-rescue-modifiers'
508
+ Enabled: true
509
+
510
+ Style/SelfAssignment:
511
+ Description: >-
512
+ Checks for places where self-assignment shorthand should have
513
+ been used.
514
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#self-assignment'
515
+ Enabled: true
516
+
517
+ Style/Semicolon:
518
+ Description: "Don't use semicolons to terminate expressions."
519
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-semicolon'
520
+ Enabled: true
521
+
522
+ Style/SignalException:
523
+ Description: 'Checks for proper usage of fail and raise.'
524
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
525
+ Enabled: true
526
+
527
+ Style/SingleLineBlockParams:
528
+ Description: 'Enforces the names of some block params.'
529
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#reduce-blocks'
530
+ Enabled: true
531
+
532
+ Style/SingleLineMethods:
533
+ Description: 'Avoid single-line methods.'
534
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-single-line-methods'
535
+ Enabled: true
536
+
537
+ Style/SingleSpaceBeforeFirstArg:
538
+ Description: >-
539
+ Checks that exactly one space is used between a method name
540
+ and the first argument for method calls without parentheses.
541
+ Enabled: true
542
+
543
+ Style/SpaceAfterColon:
544
+ Description: 'Use spaces after colons.'
545
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
546
+ Enabled: true
547
+
548
+ Style/SpaceAfterComma:
549
+ Description: 'Use spaces after commas.'
550
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
551
+ Enabled: true
552
+
553
+ Style/SpaceAfterControlKeyword:
554
+ Description: 'Use spaces after if/elsif/unless/while/until/case/when.'
555
+ Enabled: true
556
+
557
+ Style/SpaceAfterMethodName:
558
+ Description: >-
559
+ Do not put a space between a method name and the opening
560
+ parenthesis in a method definition.
561
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
562
+ Enabled: true
563
+
564
+ Style/SpaceAfterNot:
565
+ Description: Tracks redundant space after the ! operator.
566
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-bang'
567
+ Enabled: true
568
+
569
+ Style/SpaceAfterSemicolon:
570
+ Description: 'Use spaces after semicolons.'
571
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
572
+ Enabled: true
573
+
574
+ Style/SpaceBeforeBlockBraces:
575
+ Description: >-
576
+ Checks that the left block brace has or doesn't have space
577
+ before it.
578
+ Enabled: true
579
+
580
+ Style/SpaceBeforeComma:
581
+ Description: 'No spaces before commas.'
582
+ Enabled: true
583
+
584
+ Style/SpaceBeforeComment:
585
+ Description: >-
586
+ Checks for missing space between code and a comment on the
587
+ same line.
588
+ Enabled: true
589
+
590
+ Style/SpaceBeforeSemicolon:
591
+ Description: 'No spaces before semicolons.'
592
+ Enabled: true
593
+
594
+ Style/SpaceInsideBlockBraces:
595
+ Description: >-
596
+ Checks that block braces have or don't have surrounding space.
597
+ For blocks taking parameters, checks that the left brace has
598
+ or doesn't have trailing space.
599
+ Enabled: true
600
+
601
+ Style/SpaceAroundBlockParameters:
602
+ Description: 'Checks the spacing inside and after block parameters pipes.'
603
+ Enabled: true
604
+
605
+ Style/SpaceAroundEqualsInParameterDefault:
606
+ Description: >-
607
+ Checks that the equals signs in parameter default assignments
608
+ have or don't have surrounding space depending on
609
+ configuration.
610
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-around-equals'
611
+ Enabled: true
612
+
613
+ Style/SpaceAroundOperators:
614
+ Description: 'Use a single space around operators.'
615
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
616
+ Enabled: true
617
+
618
+ Style/SpaceBeforeModifierKeyword:
619
+ Description: 'Put a space before the modifier keyword.'
620
+ Enabled: true
621
+
622
+ Style/SpaceInsideBrackets:
623
+ Description: 'No spaces after [ or before ].'
624
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
625
+ Enabled: true
626
+
627
+ Style/SpaceInsideHashLiteralBraces:
628
+ Description: "Use spaces inside hash literal braces - or don't."
629
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-operators'
630
+ Enabled: true
631
+
632
+ Style/SpaceInsideParens:
633
+ Description: 'No spaces after ( or before ).'
634
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-spaces-braces'
635
+ Enabled: true
636
+
637
+ Style/SpaceInsideRangeLiteral:
638
+ Description: 'No spaces inside range literals.'
639
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-space-inside-range-literals'
640
+ Enabled: true
641
+
642
+ Style/SpecialGlobalVars:
643
+ Description: 'Avoid Perl-style global variables.'
644
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-cryptic-perlisms'
645
+ Enabled: true
646
+
647
+ Style/StringLiterals:
648
+ Description: 'Checks if uses of quotes match the configured preference.'
649
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
650
+ Enabled: true
651
+
652
+ Style/StringLiteralsInInterpolation:
653
+ Description: >-
654
+ Checks if uses of quotes inside expressions in interpolated
655
+ strings match the configured preference.
656
+ Enabled: true
657
+
658
+ Style/StructInheritance:
659
+ Description: 'Checks for inheritance from Struct.new.'
660
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-extend-struct-new'
661
+ Enabled: true
662
+
663
+ Style/SymbolProc:
664
+ Description: 'Use symbols as procs instead of blocks when possible.'
665
+ Enabled: true
666
+
667
+ Style/Tab:
668
+ Description: 'No hard tabs.'
669
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
670
+ Enabled: true
671
+
672
+ Style/TrailingBlankLines:
673
+ Description: 'Checks trailing blank lines and final newline.'
674
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
675
+ Enabled: true
676
+
677
+ Style/TrailingComma:
678
+ Description: 'Checks for trailing comma in parameter lists and literals.'
679
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
680
+ Enabled: true
681
+
682
+ Style/TrailingWhitespace:
683
+ Description: 'Avoid trailing whitespace.'
684
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
685
+ Enabled: true
686
+
687
+ Style/TrivialAccessors:
688
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
689
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
690
+ Enabled: true
691
+
692
+ Style/UnlessElse:
693
+ Description: >-
694
+ Do not use unless with else. Rewrite these with the positive
695
+ case first.
696
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
697
+ Enabled: true
698
+
699
+ Style/UnneededCapitalW:
700
+ Description: 'Checks for %W when interpolation is not needed.'
701
+ Enabled: true
702
+
703
+ Style/UnneededPercentQ:
704
+ Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
705
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
706
+ Enabled: true
707
+
708
+ Style/UnneededPercentX:
709
+ Description: 'Checks for %x when `` would do.'
710
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
711
+ Enabled: true
712
+
713
+ Style/VariableInterpolation:
714
+ Description: >-
715
+ Don't interpolate global, instance and class variables
716
+ directly in strings.
717
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
718
+ Enabled: true
719
+
720
+ Style/VariableName:
721
+ Description: 'Use the configured style when naming variables.'
722
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
723
+ Enabled: true
724
+
725
+ Style/WhenThen:
726
+ Description: 'Use when x then ... for one-line cases.'
727
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
728
+ Enabled: true
729
+
730
+ Style/WhileUntilDo:
731
+ Description: 'Checks for redundant do after while or until.'
732
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
733
+ Enabled: true
734
+
735
+ Style/WhileUntilModifier:
736
+ Description: >-
737
+ Favor modifier while/until usage when you have a
738
+ single-line body.
739
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
740
+ Enabled: true
741
+
742
+ Style/WordArray:
743
+ Description: 'Use %w or %W for arrays of words.'
744
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
745
+ Enabled: true
746
+
747
+ #################### Metrics ################################
748
+
749
+ Metrics/AbcSize:
750
+ Description: >-
751
+ A calculated magnitude based on number of assignments,
752
+ branches, and conditions.
753
+ Enabled: true
754
+
755
+ Metrics/BlockNesting:
756
+ Description: 'Avoid excessive block nesting'
757
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
758
+ Enabled: true
759
+
760
+ Metrics/ClassLength:
761
+ Description: 'Avoid classes longer than 100 lines of code.'
762
+ Enabled: true
763
+
764
+ Metrics/CyclomaticComplexity:
765
+ Description: >-
766
+ A complexity metric that is strongly correlated to the number
767
+ of test cases needed to validate a method.
768
+ Enabled: true
769
+
770
+ Metrics/LineLength:
771
+ Description: 'Limit lines to 80 characters.'
772
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
773
+ Enabled: true
774
+
775
+ Metrics/MethodLength:
776
+ Description: 'Avoid methods longer than 10 lines of code.'
777
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
778
+ Enabled: true
779
+
780
+ Metrics/ParameterLists:
781
+ Description: 'Avoid parameter lists longer than three or four parameters.'
782
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
783
+ Enabled: true
784
+
785
+ Metrics/PerceivedComplexity:
786
+ Description: >-
787
+ A complexity metric geared towards measuring complexity for a
788
+ human reader.
789
+ Enabled: true
790
+
791
+ #################### Lint ################################
792
+ ### Warnings
793
+
794
+ Lint/AmbiguousOperator:
795
+ Description: >-
796
+ Checks for ambiguous operators in the first argument of a
797
+ method invocation without parentheses.
798
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
799
+ Enabled: true
800
+
801
+ Lint/AmbiguousRegexpLiteral:
802
+ Description: >-
803
+ Checks for ambiguous regexp literals in the first argument of
804
+ a method invocation without parenthesis.
805
+ Enabled: true
806
+
807
+ Lint/AssignmentInCondition:
808
+ Description: "Don't use assignment in conditions."
809
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
810
+ Enabled: true
811
+
812
+ Lint/BlockAlignment:
813
+ Description: 'Align block ends correctly.'
814
+ Enabled: true
815
+
816
+ Lint/ConditionPosition:
817
+ Description: >-
818
+ Checks for condition placed in a confusing position relative to
819
+ the keyword.
820
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
821
+ Enabled: true
822
+
823
+ Lint/Debugger:
824
+ Description: 'Check for debugger calls.'
825
+ Enabled: true
826
+
827
+ Lint/DefEndAlignment:
828
+ Description: 'Align ends corresponding to defs correctly.'
829
+ Enabled: true
830
+
831
+ Lint/DeprecatedClassMethods:
832
+ Description: 'Check for deprecated class method calls.'
833
+ Enabled: true
834
+
835
+ Lint/DuplicateMethods:
836
+ Description: 'Check for duplicate methods calls.'
837
+ Enabled: true
838
+
839
+ Lint/ElseLayout:
840
+ Description: 'Check for odd code arrangement in an else block.'
841
+ Enabled: true
842
+
843
+ Lint/EmptyEnsure:
844
+ Description: 'Checks for empty ensure block.'
845
+ Enabled: true
846
+
847
+ Lint/EmptyInterpolation:
848
+ Description: 'Checks for empty string interpolation.'
849
+ Enabled: true
850
+
851
+ Lint/EndAlignment:
852
+ Description: 'Align ends correctly.'
853
+ Enabled: true
854
+
855
+ Lint/EndInMethod:
856
+ Description: 'END blocks should not be placed inside method definitions.'
857
+ Enabled: true
858
+
859
+ Lint/EnsureReturn:
860
+ Description: 'Do not use return in an ensure block.'
861
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
862
+ Enabled: true
863
+
864
+ Lint/Eval:
865
+ Description: 'The use of eval represents a serious security risk.'
866
+ Enabled: true
867
+
868
+ Lint/HandleExceptions:
869
+ Description: "Don't suppress exception."
870
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
871
+ Enabled: true
872
+
873
+ Lint/InvalidCharacterLiteral:
874
+ Description: >-
875
+ Checks for invalid character literals with a non-escaped
876
+ whitespace character.
877
+ Enabled: true
878
+
879
+ Lint/LiteralInCondition:
880
+ Description: 'Checks of literals used in conditions.'
881
+ Enabled: true
882
+
883
+ Lint/LiteralInInterpolation:
884
+ Description: 'Checks for literals used in interpolation.'
885
+ Enabled: true
886
+
887
+ Lint/Loop:
888
+ Description: >-
889
+ Use Kernel#loop with break rather than begin/end/until or
890
+ begin/end/while for post-loop tests.
891
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
892
+ Enabled: true
893
+
894
+ Lint/ParenthesesAsGroupedExpression:
895
+ Description: >-
896
+ Checks for method calls with a space before the opening
897
+ parenthesis.
898
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
899
+ Enabled: true
900
+
901
+ Lint/RequireParentheses:
902
+ Description: >-
903
+ Use parentheses in the method call to avoid confusion
904
+ about precedence.
905
+ Enabled: true
906
+
907
+ Lint/RescueException:
908
+ Description: 'Avoid rescuing the Exception class.'
909
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
910
+ Enabled: true
911
+
912
+ Lint/ShadowingOuterLocalVariable:
913
+ Description: >-
914
+ Do not use the same name as outer local variable
915
+ for block arguments or block local variables.
916
+ Enabled: true
917
+
918
+ Lint/SpaceBeforeFirstArg:
919
+ Description: >-
920
+ Put a space between a method name and the first argument
921
+ in a method call without parentheses.
922
+ Enabled: true
923
+
924
+ Lint/StringConversionInInterpolation:
925
+ Description: 'Checks for Object#to_s usage in string interpolation.'
926
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
927
+ Enabled: true
928
+
929
+ Lint/UnderscorePrefixedVariableName:
930
+ Description: 'Do not use prefix `_` for a variable that is used.'
931
+ Enabled: true
932
+
933
+ Lint/UnusedBlockArgument:
934
+ Description: 'Checks for unused block arguments.'
935
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
936
+ Enabled: true
937
+
938
+ Lint/UnusedMethodArgument:
939
+ Description: 'Checks for unused method arguments.'
940
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
941
+ Enabled: true
942
+
943
+ Lint/UnreachableCode:
944
+ Description: 'Unreachable code.'
945
+ Enabled: true
946
+
947
+ Lint/UselessAccessModifier:
948
+ Description: 'Checks for useless access modifiers.'
949
+ Enabled: true
950
+
951
+ Lint/UselessAssignment:
952
+ Description: 'Checks for useless assignment to a local variable.'
953
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
954
+ Enabled: true
955
+
956
+ Lint/UselessComparison:
957
+ Description: 'Checks for comparison of something with itself.'
958
+ Enabled: true
959
+
960
+ Lint/UselessElseWithoutRescue:
961
+ Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
962
+ Enabled: true
963
+
964
+ Lint/UselessSetterCall:
965
+ Description: 'Checks for useless setter call to a local variable.'
966
+ Enabled: true
967
+
968
+ Lint/Void:
969
+ Description: 'Possible use of operator/literal/variable in void context.'
970
+ Enabled: true
971
+
972
+ ##################### Rails ##################################
973
+
974
+ Rails/ActionFilter:
975
+ Description: 'Enforces consistent use of action filter methods.'
976
+ Enabled: true
977
+
978
+ Rails/DefaultScope:
979
+ Description: 'Checks if the argument passed to default_scope is a block.'
980
+ Enabled: true
981
+
982
+ Rails/Delegate:
983
+ Description: 'Prefer delegate method for delegations.'
984
+ Enabled: true
985
+
986
+ Rails/HasAndBelongsToMany:
987
+ Description: 'Prefer has_many :through to has_and_belongs_to_many.'
988
+ Enabled: true
989
+
990
+ Rails/Output:
991
+ Description: 'Checks for calls to puts, print, etc.'
992
+ Enabled: true
993
+
994
+ Rails/ReadWriteAttribute:
995
+ Description: >-
996
+ Checks for read_attribute(:attr) and
997
+ write_attribute(:attr, val).
998
+ Enabled: true
999
+
1000
+ Rails/ScopeArgs:
1001
+ Description: 'Checks the arguments of ActiveRecord scopes.'
1002
+ Enabled: true
1003
+
1004
+ Rails/Validation:
1005
+ Description: 'Use validates :attribute, hash of validations.'
1006
+ Enabled: true