dvla-lint 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,663 @@
1
+ #################
2
+ ## DVLA Specials
3
+ #################
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 3.0
7
+
8
+ ############
9
+ ## General
10
+ ############
11
+
12
+ Layout/BlockAlignment:
13
+ Description: "Align block ends correctly."
14
+ Enabled: true
15
+
16
+ Layout/CaseIndentation:
17
+ Description: Indentation of when in a case/when/[else/]end.
18
+ Enabled: true
19
+ EnforcedStyle: case
20
+ SupportedStyles:
21
+ - case
22
+ - end
23
+ IndentOneStep: false
24
+
25
+ Layout/ClosingParenthesisIndentation:
26
+ Description: "Checks the indentation of hanging closing parentheses."
27
+ Enabled: false
28
+
29
+ Style/MutableConstant:
30
+ Description: "Freeze mutable objects assigned to constants."
31
+ Enabled: true
32
+
33
+ Lint/ElseLayout:
34
+ Description: "Check for odd code arrangement in an else block."
35
+ Enabled: true
36
+
37
+ # Supports --auto-correct
38
+ Layout/EmptyLineBetweenDefs:
39
+ Description: Use empty lines between defs.
40
+ Enabled: true
41
+ AllowAdjacentOneLineDefs: false
42
+
43
+ Layout/EmptyLines:
44
+ Description: "Don't use several empty lines in a row."
45
+ Enabled: true
46
+
47
+ Layout/EndAlignment:
48
+ Description: "Align ends correctly."
49
+ Enabled: true
50
+
51
+ Layout/EndOfLine:
52
+ Description: "Use Unix-style line endings."
53
+ Enabled: true
54
+
55
+ # Supports --auto-correct
56
+ Layout/IndentationWidth:
57
+ Description: Use 2 spaces for indentation.
58
+ Enabled: true
59
+
60
+ # Supports --auto-correct
61
+ Layout/IndentationConsistency:
62
+ Description: Keep indentation straight.
63
+ Enabled: true
64
+
65
+ Layout/LineContinuationLeadingSpace:
66
+ Description: Checks that strings broken over multiple lines have leading/trailing spaces
67
+ Enabled: true
68
+
69
+ Layout/LineContinuationSpacing:
70
+ Description: Checks that the backslash of a line continuation is separated from preceeding text by exactly one or zero spaces
71
+ Enabled: true
72
+
73
+ Layout/LineLength:
74
+ Description: Limit lines to 80 characters.
75
+ Enabled: false
76
+ Max: 120
77
+
78
+ # Supports --auto-correct
79
+ Layout/SpaceAroundOperators:
80
+ Description: Use spaces around operators.
81
+ Enabled: true
82
+
83
+ # Supports --auto-correct
84
+ Layout/SpaceBeforeBlockBraces:
85
+ Description: Checks that the left block brace has or doesn't have space before it.
86
+ Enabled: true
87
+ EnforcedStyle: space
88
+ SupportedStyles:
89
+ - space
90
+ - no_space
91
+
92
+ # Supports --auto-correct
93
+ Layout/SpaceAfterSemicolon:
94
+ Description: Use spaces after semicolons.
95
+ Enabled: true
96
+
97
+ # Supports --auto-correct
98
+ Layout/SpaceAfterColon:
99
+ Description: Use spaces after colons.
100
+ Enabled: true
101
+
102
+ # Supports --auto-correct
103
+ Layout/SpaceAfterComma:
104
+ Description: Use spaces after commas.
105
+ Enabled: true
106
+
107
+ # Supports --auto-correct
108
+ Layout/SpaceInsideReferenceBrackets:
109
+ Description: No spaces after array[ or before ].
110
+ Enabled: true
111
+
112
+ # Supports --auto-correct
113
+ Layout/SpaceInsideArrayLiteralBrackets:
114
+ Description: No spaces after array = [ or before ].
115
+ Enabled: true
116
+
117
+ # Supports --auto-correct
118
+ Layout/SpaceInsideParens:
119
+ Description: No spaces after ( or before ).
120
+ Enabled: true
121
+
122
+ Layout/IndentationStyle:
123
+ Description: No hard tabs.
124
+ Enabled: true
125
+
126
+ # Supports --auto-correct
127
+ Layout/TrailingWhitespace:
128
+ Description: Avoid trailing whitespace.
129
+ Enabled: true
130
+
131
+ # Supports --auto-correct
132
+ Layout/TrailingEmptyLines:
133
+ Description: Checks trailing blank lines and final newline.
134
+ Enabled: true
135
+ EnforcedStyle: final_newline
136
+ SupportedStyles:
137
+ - final_newline
138
+ - final_blank_line
139
+
140
+ ## Syntax
141
+
142
+ # Supports --auto-correct
143
+ Style/AndOr:
144
+ Description: Use &&/|| instead of and/or.
145
+ Enabled: true
146
+
147
+ # Supports --auto-correct
148
+ Style/DefWithParentheses:
149
+ Description: Use def with parentheses when there are arguments.
150
+ Enabled: true
151
+
152
+ Style/For:
153
+ Description: Checks use of for or each in multiline loops.
154
+ Enabled: true
155
+ EnforcedStyle: each
156
+ SupportedStyles:
157
+ - for
158
+ - each
159
+
160
+ Style/IfUnlessModifier:
161
+ Description: Favor modifier if/unless usage when you have a single-line body.
162
+ Enabled: false
163
+
164
+ Style/MethodCalledOnDoEndBlock:
165
+ Description: Avoid chaining a method call on a do...end block.
166
+ Enabled: false
167
+
168
+ Style/MethodCallWithoutArgsParentheses:
169
+ Description: "Do not use parentheses for method calls with no arguments."
170
+ Enabled: true
171
+
172
+ Style/MultilineBlockChain:
173
+ Description: Avoid multi-line chains of blocks.
174
+ Enabled: true
175
+
176
+ Style/MultilineIfThen:
177
+ Description: Never use then for multi-line if/unless.
178
+ Enabled: true
179
+
180
+ Style/MultilineTernaryOperator:
181
+ Description: "Avoid multi-line ?: (the ternary operator); use if/unless instead."
182
+ Enabled: true
183
+
184
+ Style/NestedTernaryOperator:
185
+ Description: Use one expression per branch in a ternary operator.
186
+ Enabled: true
187
+
188
+ Style/OneLineConditional:
189
+ Description: Favor the ternary operator(?:) over if/then/else/end constructs.
190
+ Enabled: true
191
+
192
+ # Supports --auto-correct
193
+ Style/ParenthesesAroundCondition:
194
+ Description: Don't use parentheses around the condition of an if/unless/while.
195
+ Enabled: true
196
+ AllowSafeAssignment: true
197
+
198
+ # Supports --auto-correct
199
+ Style/RedundantReturn:
200
+ Description: Don't use return where it's not required.
201
+ Enabled: true
202
+ AllowMultipleReturnValues: false
203
+
204
+ # Supports --auto-correct
205
+ Layout/SpaceAfterMethodName:
206
+ Description:
207
+ Never put a space between a method name and the opening parenthesis in
208
+ a method definition.
209
+ Enabled: true
210
+
211
+ # Supports --auto-correct
212
+ Layout/SpaceAroundEqualsInParameterDefault:
213
+ Description:
214
+ Checks that the equals signs in parameter default assignments have or
215
+ don't have surrounding space depending on configuration.
216
+ Enabled: true
217
+ EnforcedStyle: space
218
+ SupportedStyles:
219
+ - space
220
+ - no_space
221
+
222
+ Style/UnlessElse:
223
+ Description: Never use unless with else. Rewrite these with the positive case first.
224
+ Enabled: true
225
+
226
+ # Supports --auto-correct
227
+ Lint/UnusedBlockArgument:
228
+ Description: Checks for unused block arguments.
229
+ Enabled: true
230
+
231
+ Style/EmptyElse:
232
+ Description: "Checks for empty else blocks. Causes issues when assigning a variable to a conditional statement."
233
+ Enabled: false
234
+
235
+ ## Naming
236
+
237
+ Naming/ClassAndModuleCamelCase:
238
+ Description: Use CamelCase for classes and modules.
239
+ Enabled: true
240
+
241
+ # Supports --auto-correct
242
+ Style/ClassMethods:
243
+ Description: Use self when defining module/class methods.
244
+ Enabled: true
245
+
246
+ Style/ClassVars:
247
+ Description: Avoid the use of class variables.
248
+ Enabled: true
249
+
250
+ Naming/ConstantName:
251
+ Description: Constants should use SCREAMING_SNAKE_CASE.
252
+ Enabled: true
253
+
254
+ Naming/MethodName:
255
+ Description: Use the configured style when naming methods.
256
+ Enabled: true
257
+ EnforcedStyle: snake_case
258
+ SupportedStyles:
259
+ - snake_case
260
+ - camelCase
261
+
262
+ # Supports --auto-correct
263
+ Style/TrivialAccessors:
264
+ Description: Prefer attr_* methods to trivial readers/writers.
265
+ Enabled: true
266
+ ExactNameMatch: true
267
+ AllowPredicates: true
268
+ AllowDSLWriters: false
269
+ AllowedMethods:
270
+ - to_ary
271
+ - to_a
272
+ - to_c
273
+ - to_enum
274
+ - to_h
275
+ - to_hash
276
+ - to_i
277
+ - to_int
278
+ - to_io
279
+ - to_open
280
+ - to_path
281
+ - to_proc
282
+ - to_r
283
+ - to_regexp
284
+ - to_str
285
+ - to_s
286
+ - to_sym
287
+
288
+ Naming/VariableName:
289
+ Description: Use the configured style when naming variables.
290
+ Enabled: true
291
+ EnforcedStyle: snake_case
292
+ SupportedStyles:
293
+ - snake_case
294
+ - camelCase
295
+
296
+ ## Exceptions
297
+
298
+ # Supports --auto-correct
299
+ Lint/RescueException:
300
+ Description: Avoid rescuing the Exception class.
301
+ Enabled: true
302
+
303
+ ## Collections
304
+
305
+ # Supports --auto-correct
306
+ Layout/ArrayAlignment:
307
+ Description: Align the elements of an array literal if they span more than one line.
308
+ Enabled: true
309
+
310
+ # Supports --auto-correct
311
+ Style/HashSyntax:
312
+ Description:
313
+ "Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1,
314
+ :b => 2 }."
315
+ Enabled: true
316
+ Exclude:
317
+ - "db/schema.rb"
318
+
319
+ EnforcedStyle: ruby19
320
+ SupportedStyles:
321
+ - ruby19
322
+ - hash_rockets
323
+
324
+ Style/TrailingCommaInArrayLiteral:
325
+ Enabled: true
326
+ EnforcedStyleForMultiline: comma
327
+
328
+ Style/TrailingCommaInHashLiteral:
329
+ Enabled: true
330
+ EnforcedStyleForMultiline: comma
331
+
332
+ Style/TrailingCommaInArguments:
333
+ Enabled: true
334
+ EnforcedStyleForMultiline: comma
335
+
336
+ # Supports --auto-correct
337
+ Style/WordArray:
338
+ Description: Use %w or %W for arrays of words.
339
+ Enabled: true
340
+ MinSize: 0
341
+
342
+ Layout/MultilineMethodCallIndentation:
343
+ Enabled: false
344
+
345
+ ## Strings
346
+
347
+ # Supports --auto-correct
348
+ Lint/RedundantStringCoercion:
349
+ Description: Checks for Object#to_s usage in string interpolation.
350
+ Enabled: true
351
+
352
+ # Supports --auto-correct
353
+ Style/StringLiterals:
354
+ Description: Checks if uses of quotes match the configured preference.
355
+ Enabled: true
356
+ EnforcedStyle: single_quotes
357
+ SupportedStyles:
358
+ - single_quotes
359
+ - double_quotes
360
+
361
+ ## New Rules yet to be configured
362
+ Lint/RaiseException:
363
+ Enabled: false
364
+ Lint/StructNewOverride:
365
+ Enabled: false
366
+ Style/HashEachMethods:
367
+ Enabled: false
368
+ Style/HashTransformKeys:
369
+ Enabled: false
370
+ Style/HashTransformValues:
371
+ Enabled: false
372
+ Layout/EmptyLinesAroundAttributeAccessor:
373
+ Enabled: false
374
+ Layout/SpaceAroundMethodCallOperator:
375
+ Enabled: false
376
+ Lint/DeprecatedOpenSSLConstant:
377
+ Enabled: false
378
+ Lint/DuplicateElsifCondition:
379
+ Enabled: false
380
+ Lint/MixedRegexpCaptureTypes:
381
+ Enabled: false
382
+ Style/AccessorGrouping:
383
+ Enabled: false
384
+ Style/ArrayCoercion:
385
+ Enabled: false
386
+ Style/BisectedAttrAccessor:
387
+ Enabled: false
388
+ Style/CaseLikeIf:
389
+ Enabled: false
390
+ Style/ExponentialNotation:
391
+ Enabled: false
392
+ Style/HashAsLastArrayItem:
393
+ Enabled: false
394
+ Style/HashLikeCase:
395
+ Enabled: false
396
+ Style/RedundantAssignment:
397
+ Enabled: false
398
+ Style/RedundantFetchBlock:
399
+ Enabled: false
400
+ Style/RedundantFileExtensionInRequire:
401
+ Enabled: false
402
+ Style/RedundantRegexpCharacterClass:
403
+ Enabled: false
404
+ Style/RedundantRegexpEscape:
405
+ Enabled: false
406
+ Style/SlicingWithRange:
407
+ Enabled: false
408
+ Rails/ActiveRecordCallbacksOrder:
409
+ Enabled: false
410
+ Rails/AfterCommitOverride:
411
+ Enabled: false
412
+ Rails/FindById:
413
+ Enabled: false
414
+ Rails/Inquiry:
415
+ Enabled: false
416
+ Rails/MailerName:
417
+ Enabled: false
418
+ Rails/MatchRoute:
419
+ Enabled: false
420
+ Rails/NegateInclude:
421
+ Enabled: false
422
+ Rails/Pluck:
423
+ Enabled: false
424
+ Rails/PluckInWhere:
425
+ Enabled: false
426
+ Rails/RenderInline:
427
+ Enabled: false
428
+ Rails/RenderPlainText:
429
+ Enabled: false
430
+ Rails/ShortI18n:
431
+ Enabled: false
432
+ Rails/SquishedSQLHeredocs:
433
+ Enabled: false
434
+ Rails/WhereExists:
435
+ Enabled: false
436
+ Rails/WhereNot:
437
+ Enabled: false
438
+ Performance/AncestorsInclude:
439
+ Enabled: false
440
+ Performance/BigDecimalWithNumericArgument:
441
+ Enabled: false
442
+ Performance/RedundantSortBlock:
443
+ Enabled: false
444
+ Performance/RedundantStringChars:
445
+ Enabled: false
446
+ Performance/ReverseFirst:
447
+ Enabled: false
448
+ Performance/SortReverse:
449
+ Enabled: false
450
+ Performance/Squeeze:
451
+ Enabled: false
452
+ Performance/StringInclude:
453
+ Enabled: false
454
+ Performance/Sum:
455
+ Enabled: false
456
+
457
+
458
+
459
+ # New rules
460
+ Layout/LineEndStringConcatenationIndentation: # new in 1.18
461
+ Description: Checks the indentation of the next line after a line that ends with a string literal and a backslash.
462
+ Enabled: true
463
+ Layout/SpaceBeforeBrackets: # new in 1.7
464
+ Description: Checks for space between the name of a receiver and a left brackets.
465
+ Enabled: true
466
+
467
+ Lint/AmbiguousAssignment: # new in 1.7
468
+ Description: Checks for mistyped shorthand assignments
469
+ Enabled: true
470
+ Lint/AmbiguousOperatorPrecedence: # new in 1.21
471
+ Description: Looks for expressions containing multiple binary operators where precedence is ambiguous due to lack of parentheses
472
+ Enabled: true
473
+ Lint/AmbiguousRange: # new in 1.19
474
+ Enabled: true
475
+ Lint/DeprecatedConstants: # new in 1.8
476
+ Enabled: true
477
+ Lint/DuplicateBranch: # new in 1.3
478
+ Description: Checks that there are no repeated bodies within if/unless, case-when and rescue constructs
479
+ Enabled: true
480
+ Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
481
+ Description: Checks for duplicate elements in Regexp character classes
482
+ Enabled: true
483
+ Lint/EmptyBlock: # new in 1.1
484
+ Description: Checks for blocks without a body
485
+ Enabled: true
486
+ Lint/EmptyClass: # new in 1.3
487
+ Description: Checks for classes and metaclasses without a body
488
+ Enabled: true
489
+ AllowComments: true
490
+ Lint/EmptyInPattern: # new in 1.16
491
+ Description: Checks for the presence of in pattern branches without a body
492
+ Enabled: true
493
+ Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
494
+ Enabled: true
495
+ Lint/LambdaWithoutLiteralBlock: # new in 1.8
496
+ Enabled: true
497
+ Lint/NoReturnInBeginEndBlocks: # new in 1.2
498
+ Description: Checks for the presence of a return inside a begin..end block in assignment contexts
499
+ Enabled: true
500
+ Lint/NumberedParameterAssignment: # new in 1.9
501
+ Description: Checks for uses of numbered parameter assignment
502
+ Enabled: true
503
+ Lint/OrAssignmentToConstant: # new in 1.9
504
+ Description: Checks for unintended or-assignment to a constant
505
+ Enabled: true
506
+ Lint/RedundantDirGlobSort: # new in 1.8
507
+ Description: Sort globbed results by default in Ruby 3.0
508
+ Enabled: true
509
+ Lint/RequireRelativeSelfPath: # new in 1.22
510
+ Description: Checks for uses a file requiring itself with require_relative
511
+ Enabled: true
512
+ Lint/SymbolConversion: # new in 1.9
513
+ Description: Checks for uses of literal strings converted to a symbol where a literal symbol could be used instead
514
+ Enabled: true
515
+ Lint/ToEnumArguments: # new in 1.1
516
+ Description: ensures that to_enum/enum_for, called for the current method, has correct arguments
517
+ Enabled: true
518
+ Lint/TripleQuotes: # new in 1.9
519
+ Description: Checks for "triple quotes" (strings delimted by any odd number of quotes greater than 1)
520
+ Enabled: true
521
+ Lint/UnexpectedBlockArity: # new in 1.5
522
+ Description: Checks for a block that is known to need more positional block arguments than are given
523
+ Enabled: false
524
+ Lint/UnmodifiedReduceAccumulator: # new in 1.1
525
+ Description: Looks for reduce or inject blocks where the value returned (implicitly or explicitly) does not include the accumulator
526
+ Enabled: true
527
+ Lint/UselessRuby2Keywords: # new in 1.23
528
+ Description: Looks for ruby2_keywords calls for methods that do not need it
529
+ Enabled: true
530
+
531
+ Security/IoMethods: # new in 1.22
532
+ Enabled: false
533
+
534
+ Style/ArgumentsForwarding: # new in 1.1
535
+ Description: Identifies places where do_something(*args, &block) can be replaced by do_something(...)
536
+ Enabled: true
537
+ Style/CollectionCompact: # new in 1.2
538
+ Description: Checks for places where custom logic on rejection nils from arrays and hashes can be replaced with {Array,Hash}#{compact,compact!}
539
+ Enabled: false
540
+ Style/DocumentDynamicEvalDefinition: # new in 1.1
541
+ Description: When using class_eval (or other eval) with string interpolation, add a comment block showing its appearance if interpolated (a practice used in Rails code)
542
+ Enabled: false
543
+ Style/EndlessMethod: # new in 1.8
544
+ Description: Checks for endless methods. It can enforce either the use of endless methods definitions for single-lined method bodies, or disallow endless methods.
545
+ Enabled: true
546
+ EnforcedStyle: allow_single_line
547
+ Style/FileRead: # new in 1.24
548
+ Description: Favor File.(bin)read convenience methods
549
+ Enabled: false
550
+ Style/FileWrite: # new in 1.24
551
+ Description: Favor File.(bin)write convenience methods
552
+ Enabled: false
553
+ Style/HashConversion: # new in 1.10
554
+ Description: Checks the usage of pre-2.1 Hash[args] method of converting enumerables and sequences of values to hashes
555
+ Enabled: true
556
+ Style/HashExcept: # new in 1.7
557
+ Description: Checks for usages of Hash#reject, Hash#select, and Hash#filter methods that can be replaced with Hash#except method
558
+ Enabled: true
559
+ Style/IfWithBooleanLiteralBranches: # new in 1.9
560
+ Description: Checks for redundant if with boolean literal branches
561
+ Enabled: true
562
+ Style/InPatternThen: # new in 1.16
563
+ Description: Checks for in; uses in case expressions
564
+ Enabled: true
565
+ Style/MapToHash: # new in 1.24
566
+ Description: Looks for uses of map.to_h or collect.to_h that could be written with just to_h in Ruby >= 2.6
567
+ Enabled: true
568
+ Style/MultilineInPatternThen: # new in 1.16
569
+ Description: Checks uses of the then keyword in multi-line in statement
570
+ Enabled: true
571
+ Style/NegatedIfElseCondition: # new in 1.2
572
+ Description: Checks for uses of if-else and ternary operators with a negated condition which can be simplified by inverting condition and swapping branches
573
+ Enabled: true
574
+ Style/NestedFileDirname: # new in 1.26
575
+ Description: Checks for nested File.dirname. It replaces nested File.dirname with the level argument introduced in Ruby 3.1.
576
+ Enabled: true
577
+ Style/NilLambda: # new in 1.3
578
+ Description: Checks for lambdas that always return nil, which can be replaced with an empty lambda instead
579
+ Enabled: true
580
+ Style/NumberedParameters: # new in 1.22
581
+ Description: Checks for numbered parameters
582
+ Enabled: false
583
+ Style/NumberedParametersLimit: # new in 1.22
584
+ Description: Detects use of an excessive amount of numbered parameters in a single block. Having too many numbered parameters can make code too cryptic and hard to read
585
+ Enabled: false
586
+ Style/OpenStructUse: # new in 1.23
587
+ Description: Flags uses of OpenStruct, as it is now officially discouraged to be used for performance, version compatibility, and potential security issues
588
+ Enabled: false
589
+ Style/QuotedSymbols: # new in 1.16
590
+ Description: Checks if the quotes used for quoted symbols match the configured defaults. By default uses the same configuration as Style/StringLiterals
591
+ Enabled: true
592
+ Style/RedundantArgument: # new in 1.4
593
+ Description: Checks for a redundant argument passed to certain methods
594
+ Enabled: false
595
+ Style/RedundantSelfAssignmentBranch: # new in 1.19
596
+ Description: Checks for places where conditional branch makes redundant self-assignment
597
+ Enabled: true
598
+ Style/SelectByRegexp: # new in 1.22
599
+ Description: Looks for places where an subset of an Enumerable (array, range, set, etc.; see note below) is calculated based on a Regexp match, and suggests grep or grep_v instead
600
+ Enabled: true
601
+ Style/StringChars: # new in 1.12
602
+ Description: Checks for uses of String#split with empty string or regexp literal argument
603
+ Enabled: false
604
+ Style/SwapValues: # new in 1.1
605
+ Description: Enforces the use of shorthand-style swapping of 2 variables
606
+ Enabled: true
607
+
608
+ Rails/AddColumnIndex: # new in 2.11
609
+ Enabled: true
610
+ Rails/AttributeDefaultBlockValue: # new in 2.9
611
+ Enabled: true
612
+ Rails/EagerEvaluationLogMessage: # new in 2.11
613
+ Enabled: true
614
+ Rails/ExpandedDateRange: # new in 2.11
615
+ Enabled: true
616
+ Rails/I18nLocaleAssignment: # new in 2.11
617
+ Enabled: true
618
+ Rails/RedundantTravelBack: # new in 2.12
619
+ Enabled: true
620
+ Rails/TimeZoneAssignment: # new in 2.10
621
+ Enabled: true
622
+ Rails/UnusedIgnoredColumns: # new in 2.11
623
+ Enabled: true
624
+ Rails/WhereEquals: # new in 2.9
625
+ Enabled: true
626
+
627
+ Performance/BlockGivenWithExplicitBlock: # new in 1.9
628
+ Description: Identifies unnecessary use of a block_given? where explicit check of block argument would suffice
629
+ Enabled: true
630
+ Performance/CollectionLiteralInLoop: # new in 1.8
631
+ Description: Identifies places where Array and Hash literals are used within loops
632
+ Enabled: true
633
+ Performance/ConcurrentMonotonicTime: # new in 1.12
634
+ Enabled: false
635
+ Performance/ConstantRegexp: # new in 1.9
636
+ Description: Finds regular expressions with dynamic components that are all constants
637
+ Enabled: true
638
+ Performance/MapCompact: # new in 1.11
639
+ Description: Identifies places where map { ... }.compact can be replaced by filter_map
640
+ Enabled: true
641
+ Performance/MethodObjectAsBlock: # new in 1.9
642
+ Description: Identifies places where methods are converted to blocks, with the use of &method, and passed as arguments to method calls
643
+ Enabled: true
644
+ Performance/RedundantEqualityComparisonBlock: # new in 1.10
645
+ Enabled: false
646
+ Performance/RedundantSplitRegexpArgument: # new in 1.10
647
+ Description: Identifies places where split argument can be replaced from a deterministic regexp to a string
648
+ Enabled: true
649
+ Performance/StringIdentifierArgument: # new in 1.13
650
+ Description: Identifies places where string identifier argument can be replaced by symbol identifier argument. It prevents the redundancy of the internal string-to-symbol conversion
651
+ Enabled: true
652
+
653
+ Gemspec/DeprecatedAttributeAssignment: # new in 1.30
654
+ Description: Checks that deprecated attribute attributes are not set in a gemspec file
655
+ Enabled: true
656
+
657
+ Gemspec/RequireMFA: # new in 1.23
658
+ Description: Requires a gemspec to have rubygems_mfa_required metadata set.
659
+ Enabled: false
660
+
661
+ Naming/BlockForwarding: # new in 1.24
662
+ Description: Identifies places where do_something(&block) can be replaced by do_something(&)
663
+ Enabled: true
@@ -0,0 +1,19 @@
1
+ AllCops:
2
+ Exclude:
3
+ - db/schema.rb
4
+ - db/**/*
5
+ - bin/**/*
6
+ - node_modules/**/*
7
+ - vendor/**/*
8
+
9
+ Metrics/BlockLength:
10
+ Enabled: true
11
+ Exclude:
12
+ - "config/routes.rb"
13
+ - "test/**/*"
14
+ - "**/spec/**/*"
15
+
16
+ AllowedMethods: ["namespace"]
17
+
18
+ Bundler/DuplicatedGem:
19
+ Enabled: false
@@ -0,0 +1,7 @@
1
+ Gemspec/RequiredRubyVersion:
2
+ Description: "Checks that required_ruby_version in a gemspec file is set to a valid value (non-blank) and matches TargetRubyVersion as set in RuboCop's configuration for the gem"
3
+ Enabled: false
4
+
5
+ Gemspec/DevelopmentDependencies:
6
+ Description: Enforce that development dependencies for a gem are specified in Gemfile
7
+ Enabled: false