netdot-restclient 1.4 → 2.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,50 @@
1
+ # These are all the cops that are disabled in the default configuration.
2
+
3
+ Style/AutoResourceCleanup:
4
+ Description: 'Suggests the usage of an auto resource cleanup version of a method (if available).'
5
+ Enabled: false
6
+
7
+ Style/CollectionMethods:
8
+ Description: 'Preferred collection methods.'
9
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size'
10
+ Enabled: false
11
+
12
+ Style/Encoding:
13
+ Description: 'Use UTF-8 as the source file encoding.'
14
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#utf-8'
15
+ Enabled: false
16
+
17
+ Style/InlineComment:
18
+ Description: 'Avoid inline comments.'
19
+ Enabled: false
20
+
21
+ Style/MethodCalledOnDoEndBlock:
22
+ Description: 'Avoid chaining a method call on a do...end block.'
23
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
24
+ Enabled: false
25
+
26
+ Style/MissingElse:
27
+ Description: >-
28
+ Require if/case expressions to have an else branches.
29
+ If enabled, it is recommended that
30
+ Style/UnlessElse and Style/EmptyElse be enabled.
31
+ This will conflict with Style/EmptyElse if
32
+ Style/EmptyElse is configured to style "both"
33
+ Enabled: false
34
+ EnforcedStyle: both
35
+ SupportedStyles:
36
+ # if - warn when an if expression is missing an else branch
37
+ # case - warn when a case expression is misisng an else branch
38
+ # both - warn when an if or case expression is missing an else branch
39
+ - if
40
+ - case
41
+ - both
42
+
43
+ Style/SymbolArray:
44
+ Description: 'Use %i or %I for arrays of symbols.'
45
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-i'
46
+ Enabled: false
47
+
48
+ Style/ExtraSpacing:
49
+ Description: 'Do not use unnecessary spacing.'
50
+ Enabled: false
@@ -0,0 +1,1030 @@
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/SymbolLiteral:
664
+ Description: 'Use plain symbols instead of string symbols when possible.'
665
+ Enabled: true
666
+
667
+ Style/SymbolProc:
668
+ Description: 'Use symbols as procs instead of blocks when possible.'
669
+ Enabled: true
670
+
671
+ Style/Tab:
672
+ Description: 'No hard tabs.'
673
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#spaces-indentation'
674
+ Enabled: true
675
+
676
+ Style/TrailingBlankLines:
677
+ Description: 'Checks trailing blank lines and final newline.'
678
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#newline-eof'
679
+ Enabled: true
680
+
681
+ Style/TrailingComma:
682
+ Description: 'Checks for trailing comma in parameter lists and literals.'
683
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
684
+ Enabled: true
685
+
686
+ Style/TrailingWhitespace:
687
+ Description: 'Avoid trailing whitespace.'
688
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-whitespace'
689
+ Enabled: true
690
+
691
+ Style/TrivialAccessors:
692
+ Description: 'Prefer attr_* methods to trivial readers/writers.'
693
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#attr_family'
694
+ Enabled: true
695
+
696
+ Style/UnlessElse:
697
+ Description: >-
698
+ Do not use unless with else. Rewrite these with the positive
699
+ case first.
700
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-else-with-unless'
701
+ Enabled: true
702
+
703
+ Style/UnneededCapitalW:
704
+ Description: 'Checks for %W when interpolation is not needed.'
705
+ Enabled: true
706
+
707
+ Style/UnneededPercentQ:
708
+ Description: 'Checks for %q/%Q when single quotes or double quotes would do.'
709
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-q'
710
+ Enabled: true
711
+
712
+ Style/UnneededPercentX:
713
+ Description: 'Checks for %x when `` would do.'
714
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-x'
715
+ Enabled: true
716
+
717
+ Style/VariableInterpolation:
718
+ Description: >-
719
+ Don't interpolate global, instance and class variables
720
+ directly in strings.
721
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#curlies-interpolate'
722
+ Enabled: true
723
+
724
+ Style/VariableName:
725
+ Description: 'Use the configured style when naming variables.'
726
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-symbols-methods-vars'
727
+ Enabled: true
728
+
729
+ Style/WhenThen:
730
+ Description: 'Use when x then ... for one-line cases.'
731
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#one-line-cases'
732
+ Enabled: true
733
+
734
+ Style/WhileUntilDo:
735
+ Description: 'Checks for redundant do after while or until.'
736
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-multiline-while-do'
737
+ Enabled: true
738
+
739
+ Style/WhileUntilModifier:
740
+ Description: >-
741
+ Favor modifier while/until usage when you have a
742
+ single-line body.
743
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#while-as-a-modifier'
744
+ Enabled: true
745
+
746
+ Style/WordArray:
747
+ Description: 'Use %w or %W for arrays of words.'
748
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
749
+ Enabled: true
750
+
751
+ #################### Metrics ################################
752
+
753
+ Metrics/AbcSize:
754
+ Description: >-
755
+ A calculated magnitude based on number of assignments,
756
+ branches, and conditions.
757
+ Enabled: true
758
+
759
+ Metrics/BlockNesting:
760
+ Description: 'Avoid excessive block nesting'
761
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#three-is-the-number-thou-shalt-count'
762
+ Enabled: true
763
+
764
+ Metrics/ClassLength:
765
+ Description: 'Avoid classes longer than 100 lines of code.'
766
+ Enabled: true
767
+
768
+ Metrics/CyclomaticComplexity:
769
+ Description: >-
770
+ A complexity metric that is strongly correlated to the number
771
+ of test cases needed to validate a method.
772
+ Enabled: true
773
+
774
+ Metrics/LineLength:
775
+ Description: 'Limit lines to 80 characters.'
776
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#80-character-limits'
777
+ Enabled: true
778
+
779
+ Metrics/MethodLength:
780
+ Description: 'Avoid methods longer than 10 lines of code.'
781
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#short-methods'
782
+ Enabled: true
783
+
784
+ Metrics/ParameterLists:
785
+ Description: 'Avoid parameter lists longer than three or four parameters.'
786
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#too-many-params'
787
+ Enabled: true
788
+
789
+ Metrics/PerceivedComplexity:
790
+ Description: >-
791
+ A complexity metric geared towards measuring complexity for a
792
+ human reader.
793
+ Enabled: true
794
+
795
+ #################### Lint ################################
796
+ ### Warnings
797
+
798
+ Lint/AmbiguousOperator:
799
+ Description: >-
800
+ Checks for ambiguous operators in the first argument of a
801
+ method invocation without parentheses.
802
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-as-args'
803
+ Enabled: true
804
+
805
+ Lint/AmbiguousRegexpLiteral:
806
+ Description: >-
807
+ Checks for ambiguous regexp literals in the first argument of
808
+ a method invocation without parenthesis.
809
+ Enabled: true
810
+
811
+ Lint/AssignmentInCondition:
812
+ Description: "Don't use assignment in conditions."
813
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#safe-assignment-in-condition'
814
+ Enabled: true
815
+
816
+ Lint/BlockAlignment:
817
+ Description: 'Align block ends correctly.'
818
+ Enabled: true
819
+
820
+ Lint/ConditionPosition:
821
+ Description: >-
822
+ Checks for condition placed in a confusing position relative to
823
+ the keyword.
824
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#same-line-condition'
825
+ Enabled: true
826
+
827
+ Lint/Debugger:
828
+ Description: 'Check for debugger calls.'
829
+ Enabled: true
830
+
831
+ Lint/DefEndAlignment:
832
+ Description: 'Align ends corresponding to defs correctly.'
833
+ Enabled: true
834
+
835
+ Lint/DeprecatedClassMethods:
836
+ Description: 'Check for deprecated class method calls.'
837
+ Enabled: true
838
+
839
+ Lint/DuplicateMethods:
840
+ Description: 'Check for duplicate methods calls.'
841
+ Enabled: true
842
+
843
+ Lint/ElseLayout:
844
+ Description: 'Check for odd code arrangement in an else block.'
845
+ Enabled: true
846
+
847
+ Lint/EmptyEnsure:
848
+ Description: 'Checks for empty ensure block.'
849
+ Enabled: true
850
+
851
+ Lint/EmptyInterpolation:
852
+ Description: 'Checks for empty string interpolation.'
853
+ Enabled: true
854
+
855
+ Lint/EndAlignment:
856
+ Description: 'Align ends correctly.'
857
+ Enabled: true
858
+
859
+ Lint/EndInMethod:
860
+ Description: 'END blocks should not be placed inside method definitions.'
861
+ Enabled: true
862
+
863
+ Lint/EnsureReturn:
864
+ Description: 'Do not use return in an ensure block.'
865
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-return-ensure'
866
+ Enabled: true
867
+
868
+ Lint/Eval:
869
+ Description: 'The use of eval represents a serious security risk.'
870
+ Enabled: true
871
+
872
+ Lint/HandleExceptions:
873
+ Description: "Don't suppress exception."
874
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
875
+ Enabled: true
876
+
877
+ Lint/InvalidCharacterLiteral:
878
+ Description: >-
879
+ Checks for invalid character literals with a non-escaped
880
+ whitespace character.
881
+ Enabled: true
882
+
883
+ Lint/LiteralInCondition:
884
+ Description: 'Checks of literals used in conditions.'
885
+ Enabled: true
886
+
887
+ Lint/LiteralInInterpolation:
888
+ Description: 'Checks for literals used in interpolation.'
889
+ Enabled: true
890
+
891
+ Lint/Loop:
892
+ Description: >-
893
+ Use Kernel#loop with break rather than begin/end/until or
894
+ begin/end/while for post-loop tests.
895
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#loop-with-break'
896
+ Enabled: true
897
+
898
+ Lint/ParenthesesAsGroupedExpression:
899
+ Description: >-
900
+ Checks for method calls with a space before the opening
901
+ parenthesis.
902
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#parens-no-spaces'
903
+ Enabled: true
904
+
905
+ Lint/RequireParentheses:
906
+ Description: >-
907
+ Use parentheses in the method call to avoid confusion
908
+ about precedence.
909
+ Enabled: true
910
+
911
+ Lint/RescueException:
912
+ Description: 'Avoid rescuing the Exception class.'
913
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-blind-rescues'
914
+ Enabled: true
915
+
916
+ Lint/ShadowingOuterLocalVariable:
917
+ Description: >-
918
+ Do not use the same name as outer local variable
919
+ for block arguments or block local variables.
920
+ Enabled: true
921
+
922
+ Lint/SpaceBeforeFirstArg:
923
+ Description: >-
924
+ Put a space between a method name and the first argument
925
+ in a method call without parentheses.
926
+ Enabled: true
927
+
928
+ Lint/StringConversionInInterpolation:
929
+ Description: 'Checks for Object#to_s usage in string interpolation.'
930
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-to-s'
931
+ Enabled: true
932
+
933
+ Lint/UnderscorePrefixedVariableName:
934
+ Description: 'Do not use prefix `_` for a variable that is used.'
935
+ Enabled: true
936
+
937
+ Lint/UnusedBlockArgument:
938
+ Description: 'Checks for unused block arguments.'
939
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
940
+ Enabled: true
941
+
942
+ Lint/UnusedMethodArgument:
943
+ Description: 'Checks for unused method arguments.'
944
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
945
+ Enabled: true
946
+
947
+ Lint/UnreachableCode:
948
+ Description: 'Unreachable code.'
949
+ Enabled: true
950
+
951
+ Lint/UselessAccessModifier:
952
+ Description: 'Checks for useless access modifiers.'
953
+ Enabled: true
954
+
955
+ Lint/UselessAssignment:
956
+ Description: 'Checks for useless assignment to a local variable.'
957
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#underscore-unused-vars'
958
+ Enabled: true
959
+
960
+ Lint/UselessComparison:
961
+ Description: 'Checks for comparison of something with itself.'
962
+ Enabled: true
963
+
964
+ Lint/UselessElseWithoutRescue:
965
+ Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
966
+ Enabled: true
967
+
968
+ Lint/UselessSetterCall:
969
+ Description: 'Checks for useless setter call to a local variable.'
970
+ Enabled: true
971
+
972
+ Lint/Void:
973
+ Description: 'Possible use of operator/literal/variable in void context.'
974
+ Enabled: true
975
+
976
+ ##################### Performance #############################
977
+
978
+ Performance/Detect:
979
+ Description: 'Use `detect` instead of `select.first` or `find_all.first`.'
980
+ Enabled: true
981
+
982
+ Performance/ReverseEach:
983
+ Description: 'Use `reverse_each` instead of `reverse.each`.'
984
+ Enabled: true
985
+
986
+ ##################### Rails ##################################
987
+
988
+ Rails/ActionFilter:
989
+ Description: 'Enforces consistent use of action filter methods.'
990
+ Enabled: true
991
+
992
+ Rails/Date:
993
+ Description: >-
994
+ Checks the correct usage of date aware methods,
995
+ such as Date.today, Date.current etc.
996
+ Enabled: true
997
+
998
+ Rails/DefaultScope:
999
+ Description: 'Checks if the argument passed to default_scope is a block.'
1000
+ Enabled: true
1001
+
1002
+ Rails/Delegate:
1003
+ Description: 'Prefer delegate method for delegations.'
1004
+ Enabled: true
1005
+
1006
+ Rails/HasAndBelongsToMany:
1007
+ Description: 'Prefer has_many :through to has_and_belongs_to_many.'
1008
+ Enabled: true
1009
+
1010
+ Rails/Output:
1011
+ Description: 'Checks for calls to puts, print, etc.'
1012
+ Enabled: true
1013
+
1014
+ Rails/ReadWriteAttribute:
1015
+ Description: >-
1016
+ Checks for read_attribute(:attr) and
1017
+ write_attribute(:attr, val).
1018
+ Enabled: true
1019
+
1020
+ Rails/ScopeArgs:
1021
+ Description: 'Checks the arguments of ActiveRecord scopes.'
1022
+ Enabled: true
1023
+
1024
+ Rails/TimeZone:
1025
+ Description: 'Checks the correct usage of time zone aware methods.'
1026
+ Enabled: true
1027
+
1028
+ Rails/Validation:
1029
+ Description: 'Use validates :attribute, hash of validations.'
1030
+ Enabled: true