kpn-style 0.2.1 → 0.3.2

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.
data/ruby-3.4.yml ADDED
@@ -0,0 +1,727 @@
1
+ ---
2
+ plugins:
3
+ - rubocop-rspec
4
+ - rubocop-rspec_rails
5
+ - rubocop-factory_bot
6
+ - rubocop-capybara
7
+ AllCops:
8
+ DisplayCopNames: true
9
+ TargetRubyVersion: '3.4'
10
+ NewCops: enable
11
+ Include:
12
+ - "**/*.rb"
13
+ Exclude:
14
+ - bin/*
15
+ - ".vendor/**/*"
16
+ - Gemfile
17
+ - Rakefile
18
+ - pkg/**/*
19
+ - spec/fixtures/**/*
20
+ - vendor/**/*
21
+ RSpec/RepeatedExampleGroupBody:
22
+ Description: Checks for repeated example group bodies.
23
+ Enabled: false
24
+ RSpec/PredicateMatcher:
25
+ Description: Prefer using predicate matcher over using predicate method directly.
26
+ Enabled: true
27
+ FactoryBot/AssociationStyle:
28
+ Description: Use a consistent style to define associations.
29
+ Enabled: true
30
+ FactoryBot/ExcessiveCreateList:
31
+ Description: Check for excessive model creation in a list.
32
+ Enabled: true
33
+ FactoryBot/FactoryAssociationWithStrategy:
34
+ Description: Use definition in factory association instead of hard coding a strategy.
35
+ Enabled: true
36
+ FactoryBot/FactoryNameStyle:
37
+ Description: Checks for name style for argument of FactoryBot::Syntax::Methods.
38
+ Enabled: true
39
+ FactoryBot/IdSequence:
40
+ Description: Do not create a FactoryBot sequence for an id column.
41
+ Enabled: true
42
+ FactoryBot/RedundantFactoryOption:
43
+ Description: Checks for redundant `factory` option.
44
+ Enabled: true
45
+ Gemspec/DevelopmentDependencies:
46
+ Description: 'Checks that development dependencies are specified in Gemfile rather than gemspec.'
47
+ Enabled: true
48
+ Gemspec/DeprecatedAttributeAssignment:
49
+ Description: 'Checks that deprecated attribute assignments are not set in a gemspec file.'
50
+ Enabled: true
51
+ Gemspec/RequireMFA:
52
+ Description: 'Checks that the gemspec has metadata to require Multi-Factor Authentication from RubyGems.'
53
+ Enabled: true
54
+ Layout/LineLength:
55
+ Description: People have wide screens, use them.
56
+ Max: 240
57
+ Layout/LineContinuationLeadingSpace:
58
+ Description: >-
59
+ Use trailing spaces instead of leading spaces in strings
60
+ broken over multiple lines (by a backslash).
61
+ Enabled: true
62
+ Layout/LineContinuationSpacing:
63
+ Description: 'Checks the spacing in front of backslash in line continuations.'
64
+ Enabled: true
65
+ Layout/LineEndStringConcatenationIndentation:
66
+ Description: >-
67
+ Checks the indentation of the next line after a line that
68
+ ends with a string literal and a backslash.
69
+ Enabled: true
70
+ Layout/SpaceBeforeBrackets:
71
+ Description: 'Checks for receiver with a space before the opening brackets.'
72
+ Enabled: true
73
+ RSpec/BeEmpty:
74
+ Description: Prefer using `be_empty` when checking for an empty array.
75
+ Enabled: true
76
+ RSpec/BeforeAfterAll:
77
+ Description: Beware of using after(:all) as it may cause state to leak between tests.
78
+ A necessary evil in acceptance testing.
79
+ Exclude:
80
+ - spec/acceptance/**/*.rb
81
+ RSpec/ContainExactly:
82
+ Description: Checks where `contain_exactly` is used.
83
+ Enabled: true
84
+ RSpec/ContextWording:
85
+ Description: Checks that `context` docstring starts with an allowed prefix.
86
+ Enabled: true
87
+ Prefixes:
88
+ - when
89
+ - with
90
+ - without
91
+ AllowedPatterns: ['on']
92
+ RSpec/DuplicatedMetadata:
93
+ Description: Avoid duplicated metadata.
94
+ Enabled: true
95
+ RSpec/EmptyExampleGroup:
96
+ Description: Checks if an example group does not include any tests.
97
+ Enabled: false
98
+ RSpec/EmptyMetadata:
99
+ Description: Avoid empty metadata hash.
100
+ Enabled: true
101
+ RSpec/Eq:
102
+ Description: Use `eq` instead of `be ==` to compare objects.
103
+ Enabled: true
104
+ RSpec/IndexedLet:
105
+ Description: Do not set up test data using indexes (e.g., `item_1`, `item_2`).
106
+ Enabled: true
107
+ RSpec/HookArgument:
108
+ Description: Prefer explicit :each argument, matching existing module's style
109
+ EnforcedStyle: each
110
+ RSpec/MatchArray:
111
+ Description: Checks where `match_array` is used.
112
+ Enabled: true
113
+ RSpec/MetadataStyle:
114
+ Description: Use consistent metadata style.
115
+ Enabled: true
116
+ RSpec/PendingWithoutReason:
117
+ Description: Checks for pending or skipped examples without reason.
118
+ Enabled: true
119
+ RSpec/ReceiveMessages:
120
+ Description: Checks for multiple messages stubbed on the same object.
121
+ Enabled: true
122
+ RSpec/RedundantAround:
123
+ Description: Remove redundant `around` hook.
124
+ Enabled: true
125
+ RSpec/RedundantPredicateMatcher:
126
+ Description: Checks for redundant predicate matcher.
127
+ Enabled: true
128
+ RSpec/RemoveConst:
129
+ Description: Checks that `remove_const` is not used in specs.
130
+ Enabled: true
131
+ RSpec/RepeatedDescription:
132
+ Description: Check for repeated description strings in example groups.
133
+ Enabled: false
134
+ RSpec/SkipBlockInsideExample:
135
+ Description: Checks for passing a block to `skip` within examples.
136
+ Enabled: true
137
+ RSpec/SpecFilePathFormat:
138
+ Description: Checks that spec file paths are consistent and well-formed.
139
+ Enabled: true
140
+ RSpec/SpecFilePathSuffix:
141
+ Description: Checks that spec file paths suffix are consistent and well-formed.
142
+ Enabled: true
143
+ RSpecRails/MinitestAssertions:
144
+ Description: Check if using Minitest matchers.
145
+ Enabled: true
146
+ RSpecRails/NegationBeValid:
147
+ Description: Enforces use of `be_invalid` or `not_to` for negated be_valid.
148
+ Enabled: true
149
+ RSpecRails/TravelAround:
150
+ Description: Prefer to travel in `before` rather than `around`.
151
+ Enabled: true
152
+ Style/BlockDelimiters:
153
+ Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to be consistent then.
154
+ EnforcedStyle: braces_for_chaining
155
+ Style/ClassAndModuleChildren:
156
+ Description: Compact style reduces the required amount of indentation.
157
+ EnforcedStyle: compact
158
+ Style/EmptyElse:
159
+ Description: Enforce against empty else clauses, but allow `nil` for clarity.
160
+ EnforcedStyle: empty
161
+ Style/FormatString:
162
+ Description: Following the main puppet project's style, prefer the % format format.
163
+ EnforcedStyle: percent
164
+ Style/FormatStringToken:
165
+ Description: Following the main puppet project's style, prefer the simpler template
166
+ tokens over annotated ones.
167
+ EnforcedStyle: template
168
+ Style/Lambda:
169
+ Description: Prefer the keyword for easier discoverability.
170
+ EnforcedStyle: literal
171
+ Style/RegexpLiteral:
172
+ Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
173
+ EnforcedStyle: percent_r
174
+ Style/TernaryParentheses:
175
+ Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
176
+ on complex expressions for better readability, but seriously consider breaking
177
+ it up.
178
+ EnforcedStyle: require_parentheses_when_complex
179
+ Style/TrailingCommaInArguments:
180
+ Description: Prefer always trailing comma on multiline argument lists. This makes
181
+ diffs, and re-ordering nicer.
182
+ EnforcedStyleForMultiline: comma
183
+ Style/TrailingCommaInArrayLiteral:
184
+ EnforcedStyleForMultiline: comma
185
+ Style/TrailingCommaInHashLiteral:
186
+ EnforcedStyleForMultiline: comma
187
+ Style/SymbolArray:
188
+ Description: Using percent style obscures symbolic intent of array's contents.
189
+ EnforcedStyle: brackets
190
+ RSpec/MessageSpies:
191
+ Description: Checks that message expectations are set using spies.
192
+ EnforcedStyle: receive
193
+ Style/CollectionMethods:
194
+ Description: Preferred collection methods.
195
+ Enabled: true
196
+ Style/MethodCalledOnDoEndBlock:
197
+ Description: Avoid chaining a method call on a do...end block.
198
+ Enabled: true
199
+ Style/StringMethods:
200
+ Description: Checks if configured preferred methods are used over non-preferred.
201
+ Enabled: true
202
+ Layout/EndOfLine:
203
+ Description: Use Unix-style line endings.
204
+ EnforcedStyle: lf
205
+ Metrics/AbcSize:
206
+ Description: >-
207
+ A calculated magnitude based on number of assignments,
208
+ branches, and conditions.
209
+ Enabled: false
210
+ Metrics/BlockLength:
211
+ Description: Avoid long blocks with many lines.
212
+ Enabled: false
213
+ Metrics/ClassLength:
214
+ Description: Avoid classes longer than 100 lines of code.
215
+ Enabled: false
216
+ Metrics/CollectionLiteralLength:
217
+ Description: 'Checks for `Array` or `Hash` literals with many entries.'
218
+ Enabled: true
219
+ Metrics/CyclomaticComplexity:
220
+ Description: >-
221
+ A complexity metric that is strongly correlated to the number
222
+ of test cases needed to validate a method.
223
+ Enabled: false
224
+ Metrics/MethodLength:
225
+ Description: Avoid methods longer than 10 lines of code.
226
+ Enabled: false
227
+ Metrics/ModuleLength:
228
+ Description: Avoid modules longer than 100 lines of code.
229
+ Enabled: false
230
+ Metrics/ParameterLists:
231
+ Description: Avoid parameter lists longer than three or four parameters.
232
+ Enabled: false
233
+ Metrics/PerceivedComplexity:
234
+ Description: >-
235
+ A complexity metric geared towards measuring complexity for a
236
+ human reader.
237
+ Enabled: false
238
+ RSpec/DescribeClass:
239
+ Description: Check that the first argument to the top-level describe is a constant.
240
+ Enabled: false
241
+ RSpec/ExampleLength:
242
+ Description: Checks for long examples.
243
+ Enabled: false
244
+ RSpec/MessageExpectation:
245
+ Description: Checks for consistent message expectation style.
246
+ Enabled: false
247
+ RSpec/MultipleExpectations:
248
+ Description: Checks if examples contain too many `expect` calls.
249
+ Enabled: false
250
+ RSpec/NestedGroups:
251
+ Description: Checks for nested example groups.
252
+ Enabled: false
253
+ Style/AsciiComments:
254
+ Description: Use only ascii symbols in comments.
255
+ Enabled: false
256
+ Style/IfUnlessModifier:
257
+ Description: Don't force trailing if/unless for single-line conditionals
258
+ Enabled: false
259
+ Style/SymbolProc:
260
+ Description: Use symbols as procs instead of blocks when possible.
261
+ Enabled: false
262
+ Layout/EmptyLinesAroundAttributeAccessor:
263
+ Description: Keep blank lines around attribute accessors.
264
+ Enabled: true
265
+ Layout/SpaceAroundMethodCallOperator:
266
+ Description: Checks method call operators to not have spaces around them.
267
+ Enabled: true
268
+ Lint/AmbiguousAssignment:
269
+ Description: 'Checks for mistyped shorthand assignments.'
270
+ Enabled: true
271
+ Lint/AmbiguousOperatorPrecedence:
272
+ Description: >-
273
+ Checks for expressions containing multiple binary operations with
274
+ ambiguous precedence.
275
+ Enabled: true
276
+ Lint/AmbiguousRange:
277
+ Description: 'Checks for ranges with ambiguous boundaries.'
278
+ Enabled: true
279
+ Lint/ConstantOverwrittenInRescue:
280
+ Description: 'Checks for overwriting an exception with an exception result by use `rescue =>`.'
281
+ Enabled: true
282
+ Lint/DeprecatedConstants:
283
+ Description: 'Checks for deprecated constants.'
284
+ Enabled: true
285
+ Lint/DuplicateBranch:
286
+ Description: 'Checks that there are no repeated bodies within `if/unless`, `case-when` and `rescue` constructs.'
287
+ Enabled: true
288
+ Lint/DuplicateMagicComment:
289
+ Description: 'Check for duplicated magic comments.'
290
+ Enabled: true
291
+ Lint/DuplicateMatchPattern:
292
+ Description: 'Do not repeat patterns in `in` keywords.'
293
+ Enabled: true
294
+ Lint/DuplicateRegexpCharacterClassElement:
295
+ Description: 'Checks for duplicate elements in Regexp character classes.'
296
+ Enabled: true
297
+ Lint/EmptyBlock:
298
+ Description: 'Checks for blocks without a body.'
299
+ Enabled: true
300
+ Lint/EmptyClass:
301
+ Description: 'Checks for classes and metaclasses without a body.'
302
+ Enabled: true
303
+ Lint/EmptyInPattern:
304
+ Description: 'Checks for the presence of `in` pattern branches without a body.'
305
+ Enabled: true
306
+ Lint/IncompatibleIoSelectWithFiberScheduler:
307
+ Description: 'Checks for `IO.select` that is incompatible with Fiber Scheduler.'
308
+ Enabled: true
309
+ Lint/ItWithoutArgumentsInBlock:
310
+ Description: 'Checks uses of `it` calls without arguments in block.'
311
+ Enabled: true
312
+ Lint/LambdaWithoutLiteralBlock:
313
+ Description: 'Checks uses of lambda without a literal block.'
314
+ Enabled: true
315
+ Lint/LiteralAssignmentInCondition:
316
+ Description: 'Checks for literal assignments in the conditions.'
317
+ Enabled: true
318
+ Lint/MixedCaseRange:
319
+ Description: 'Checks for mixed-case character ranges since they include likely unintended characters.'
320
+ Enabled: true
321
+ Lint/NoReturnInBeginEndBlocks:
322
+ Description: 'Do not `return` inside `begin..end` blocks in assignment contexts.'
323
+ Enabled: true
324
+ Lint/NonAtomicFileOperation:
325
+ Description: 'Checks for non-atomic file operations.'
326
+ Enabled: true
327
+ Lint/NumberedParameterAssignment:
328
+ Description: 'Checks for uses of numbered parameter assignment.'
329
+ Enabled: true
330
+ Lint/OrAssignmentToConstant:
331
+ Description: 'Checks unintended or-assignment to constant.'
332
+ Enabled: true
333
+ Lint/RedundantDirGlobSort:
334
+ Description: 'Checks for redundant `sort` method to `Dir.glob` and `Dir[]`.'
335
+ Enabled: true
336
+ Lint/RedundantRegexpQuantifiers:
337
+ Description: 'Checks for redundant quantifiers in Regexps.'
338
+ Enabled: true
339
+ Lint/RefinementImportMethods:
340
+ Description: 'Use `Refinement#import_methods` when using `include` or `prepend` in `refine` block.'
341
+ Enabled: true
342
+ Lint/RequireRangeParentheses:
343
+ Description: 'Checks that a range literal is enclosed in parentheses when the end of the range is at a line break.'
344
+ Enabled: true
345
+ Lint/RequireRelativeSelfPath:
346
+ Description: 'Checks for uses a file requiring itself with `require_relative`.'
347
+ Enabled: true
348
+ Lint/SymbolConversion:
349
+ Description: 'Checks for unnecessary symbol conversions.'
350
+ Enabled: true
351
+ Lint/ToEnumArguments:
352
+ Description: 'Ensures that `to_enum`/`enum_for`, called for the current method, has correct arguments.'
353
+ Enabled: true
354
+ Lint/TripleQuotes:
355
+ Description: 'Checks for useless triple quote constructs.'
356
+ Enabled: true
357
+ Lint/UnexpectedBlockArity:
358
+ Description: 'Looks for blocks that have fewer arguments that the calling method expects.'
359
+ Enabled: true
360
+ Lint/UnmodifiedReduceAccumulator:
361
+ Description: 'Checks for `reduce` or `inject` blocks that do not update the accumulator each iteration.'
362
+ Enabled: true
363
+ Lint/UselessRescue:
364
+ Description: 'Checks for useless `rescue`s.'
365
+ Enabled: true
366
+ Lint/UselessRuby2Keywords:
367
+ Description: 'Finds unnecessary uses of `ruby2_keywords`.'
368
+ Enabled: true
369
+ Lint/BinaryOperatorWithIdenticalOperands:
370
+ Description: This cop checks for places where binary operator has identical operands.
371
+ Enabled: true
372
+ Lint/DeprecatedOpenSSLConstant:
373
+ Description: Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`.
374
+ Enabled: true
375
+ Lint/DuplicateElsifCondition:
376
+ Description: Do not repeat conditions used in if `elsif`.
377
+ Enabled: true
378
+ Lint/DuplicateRescueException:
379
+ Description: Checks that there are no repeated exceptions used in `rescue` expressions.
380
+ Enabled: true
381
+ Lint/EmptyConditionalBody:
382
+ Description: This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.
383
+ Enabled: true
384
+ Lint/FloatComparison:
385
+ Description: Checks for the presence of precise comparison of floating point numbers.
386
+ Enabled: true
387
+ Lint/MissingSuper:
388
+ Description: >-
389
+ This cop checks for the presence of constructors and lifecycle callbacks
390
+ without calls to `super`'.
391
+ Enabled: true
392
+ Lint/MixedRegexpCaptureTypes:
393
+ Description: Do not mix named captures and numbered captures in a Regexp literal.
394
+ Enabled: true
395
+ Lint/OutOfRangeRegexpRef:
396
+ Description: Checks for out of range reference for Regexp because it always returns nil.
397
+ Enabled: true
398
+ Lint/RaiseException:
399
+ Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
400
+ Enabled: true
401
+ Lint/SelfAssignment:
402
+ Description: Checks for self-assignments.
403
+ Enabled: true
404
+ Lint/StructNewOverride:
405
+ Description: Disallow overriding the `Struct` built-in methods via `Struct.new`.
406
+ Enabled: true
407
+ Lint/TopLevelReturnWithArgument:
408
+ Description: This cop detects top level return statements with argument.
409
+ Enabled: true
410
+ Lint/UnreachableLoop:
411
+ Description: This cop checks for loops that will have at most one iteration.
412
+ Enabled: true
413
+ Naming/BlockForwarding:
414
+ Description: 'Use anonymous block forwarding.'
415
+ Enabled: true
416
+ RSpec/BeEq: #
417
+ Description: 'Check for expectations where `be(...)` can replace `eq(...)`.'
418
+ Enabled: true
419
+ RSpec/BeNil: #
420
+ Description: 'Ensures a consistent style is used when matching `nil`.'
421
+ Enabled: true
422
+ RSpec/ChangeByZero:
423
+ Description: 'Prefer negated matchers over `to change.by(0)`.'
424
+ Enabled: true
425
+ RSpec/ClassCheck:
426
+ Description: 'Enforces consistent use of `be_a` or `be_kind_of`.'
427
+ Enabled: true
428
+ RSpec/ExcessiveDocstringSpacing:
429
+ Description: 'Checks for excessive whitespace in example descriptions.'
430
+ Enabled: true
431
+ RSpec/IdenticalEqualityAssertion:
432
+ Description: 'Checks for equality assertions with identical expressions on both sides.'
433
+ Enabled: true
434
+ RSpec/NoExpectationExample:
435
+ Description: 'Checks if an example contains any expectation.'
436
+ Enabled: false
437
+ RSpec/SortMetadata:
438
+ Description: 'Sort RSpec metadata alphabetically.'
439
+ Enabled: true
440
+ RSpec/SubjectDeclaration:
441
+ Description: 'Ensure that subject is defined using subject helper.'
442
+ Enabled: true
443
+ RSpec/VerifiedDoubleReference:
444
+ Description: 'Checks for consistent verified double reference style.'
445
+ Enabled: true
446
+ FactoryBot/ConsistentParenthesesStyle:
447
+ Description: 'Use a consistent style for parentheses in factory bot calls.'
448
+ Enabled: true
449
+ FactoryBot/SyntaxMethods:
450
+ Description: 'Use shorthands from `FactoryBot::Syntax::Methods` in your specs.'
451
+ Enabled: true
452
+ RSpecRails/AvoidSetupHook:
453
+ Description: 'Checks that tests use RSpec `before` hook over Rails `setup` method.'
454
+ Enabled: true
455
+ RSpecRails/HaveHttpStatus:
456
+ Description: 'Checks that tests use `have_http_status` instead of equality matchers.'
457
+ Enabled: true
458
+ RSpecRails/InferredSpecType:
459
+ Description: 'Identifies redundant spec type.'
460
+ Enabled: true
461
+ Security/CompoundHash:
462
+ Description: 'When overwriting Object#hash to combine values, prefer delegating to Array#hash over writing a custom implementation.'
463
+ Enabled: true
464
+ Security/IoMethods:
465
+ Description: >-
466
+ Checks for the first argument to `IO.read`, `IO.binread`, `IO.write`, `IO.binwrite`,
467
+ `IO.foreach`, and `IO.readlines`.
468
+ Enabled: true
469
+ Style/ArgumentsForwarding:
470
+ Description: 'Use arguments forwarding.'
471
+ Enabled: true
472
+ Style/ArrayIntersect:
473
+ Description: 'Use `array1.intersect?(array2)` instead of `(array1 & array2).any?`.'
474
+ Enabled: true
475
+ Style/CollectionCompact:
476
+ Description: 'Use `{Array,Hash}#{compact,compact!}` instead of custom logic to reject nils.'
477
+ Enabled: true
478
+ Style/ConcatArrayLiterals:
479
+ Description: 'Enforces the use of `Array#push(item)` instead of `Array#concat([item])` to avoid redundant array literals.'
480
+ Enabled: true
481
+ Style/ComparableClamp:
482
+ Description: 'Enforces the use of `Comparable#clamp` instead of comparison by minimum and maximum.'
483
+ Enabled: true
484
+ Style/DataInheritance:
485
+ Description: 'Checks for inheritance from Data.define.'
486
+ Enabled: true
487
+ Style/DirEmpty:
488
+ Description: >-
489
+ Prefer to use `Dir.empty?('path/to/dir')` when checking if a directory is empty.
490
+ Enabled: true
491
+ Style/DocumentDynamicEvalDefinition:
492
+ Description: >-
493
+ When using `class_eval` (or other `eval`) with string interpolation,
494
+ add a comment block showing its appearance if interpolated.
495
+ Enabled: true
496
+ Style/EmptyHeredoc:
497
+ Description: 'Checks for using empty heredoc to reduce redundancy.'
498
+ Enabled: true
499
+ Style/EndlessMethod:
500
+ Description: 'Avoid the use of multi-lined endless method definitions.'
501
+ Enabled: true
502
+ Style/EnvHome:
503
+ Description: "Checks for consistent usage of `ENV['HOME']`."
504
+ Enabled: true
505
+ Style/ExactRegexpMatch:
506
+ Description: 'Checks for exact regexp match inside Regexp literals.'
507
+ Enabled: true
508
+ Style/FetchEnvVar:
509
+ Description: >-
510
+ Suggests `ENV.fetch` for the replacement of `ENV[]`.
511
+ Enabled: true
512
+ Style/FileEmpty:
513
+ Description: >-
514
+ Prefer to use `File.empty?('path/to/file')` when checking if a file is empty.
515
+ Enabled: true
516
+ Style/FileRead:
517
+ Description: 'Favor `File.(bin)read` convenience methods.'
518
+ Enabled: true
519
+ Style/FileWrite:
520
+ Description: 'Favor `File.(bin)write` convenience methods.'
521
+ Enabled: true
522
+ Style/HashConversion:
523
+ Description: 'Avoid Hash[] in favor of ary.to_h or literal hashes.'
524
+ Enabled: true
525
+ Style/HashExcept:
526
+ Description: >-
527
+ Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods
528
+ that can be replaced with `Hash#except` method.
529
+ Enabled: true
530
+ Style/IfWithBooleanLiteralBranches:
531
+ Description: 'Checks for redundant `if` with boolean literal branches.'
532
+ Enabled: true
533
+ Style/InPatternThen:
534
+ Description: 'Checks for `in;` uses in `case` expressions.'
535
+ Enabled: true
536
+ Style/MagicCommentFormat:
537
+ Description: 'Use a consistent style for magic comments.'
538
+ Enabled: true
539
+ Style/MapCompactWithConditionalBlock:
540
+ Description: 'Prefer `select` or `reject` over `map { ... }.compact`.'
541
+ Enabled: true
542
+ Style/MapToHash:
543
+ Description: 'Prefer `to_h` with a block over `map.to_h`.'
544
+ Enabled: true
545
+ Style/MapToSet:
546
+ Description: 'Prefer `to_set` with a block over `map.to_set`.'
547
+ Enabled: true
548
+ Style/MinMaxComparison:
549
+ Description: 'Enforces the use of `max` or `min` instead of comparison for greater or less.'
550
+ Enabled: true
551
+ Style/MultilineInPatternThen:
552
+ Description: 'Do not use `then` for multi-line `in` statement.'
553
+ Enabled: true
554
+ Style/NegatedIfElseCondition:
555
+ Description: >-
556
+ Checks for uses of `if-else` and ternary operators with a negated condition
557
+ which can be simplified by inverting condition and swapping branches.
558
+ Enabled: true
559
+ Style/NestedFileDirname:
560
+ Description: 'Checks for nested `File.dirname`.'
561
+ Enabled: true
562
+ Style/NilLambda:
563
+ Description: 'Prefer `-> {}` to `-> { nil }`.'
564
+ Enabled: true
565
+ Style/NumberedParameters:
566
+ Description: 'Restrict the usage of numbered parameters.'
567
+ Enabled: true
568
+ Style/NumberedParametersLimit:
569
+ Description: 'Avoid excessive numbered params in a single block.'
570
+ Enabled: true
571
+ Style/ObjectThen:
572
+ Description: 'Enforces the use of consistent method names `Object#yield_self` or `Object#then`.'
573
+ Enabled: true
574
+ Style/OpenStructUse:
575
+ Description: >-
576
+ Avoid using OpenStruct. As of Ruby 3.0, use is officially discouraged due to performance,
577
+ version compatibility, and potential security issues.
578
+ Enabled: true
579
+ Style/OperatorMethodCall:
580
+ Description: 'Checks for redundant dot before operator method call.'
581
+ Enabled: true
582
+ Style/QuotedSymbols:
583
+ Description: 'Use a consistent style for quoted symbols.'
584
+ Enabled: true
585
+ Style/RedundantArgument:
586
+ Description: 'Check for a redundant argument passed to certain methods.'
587
+ Enabled: true
588
+ Style/RedundantArrayConstructor:
589
+ Description: 'Checks for the instantiation of array using redundant `Array` constructor.'
590
+ Enabled: true
591
+ Style/RedundantConstantBase:
592
+ Description: Avoid redundant `::` prefix on constant.
593
+ Enabled: true
594
+ Style/RedundantCurrentDirectoryInPath:
595
+ Description: 'Checks for uses a redundant current directory in path.'
596
+ Enabled: true
597
+ Style/RedundantDoubleSplatHashBraces:
598
+ Description: 'Checks for redundant uses of double splat hash braces.'
599
+ Enabled: true
600
+ Style/RedundantEach:
601
+ Description: 'Checks for redundant `each`.'
602
+ Enabled: true
603
+ Style/RedundantFilterChain:
604
+ Description: >-
605
+ Identifies usages of `any?`, `empty?`, `none?` or `one?` predicate methods chained to
606
+ `select`/`filter`/`find_all` and change them to use predicate method instead.
607
+ Enabled: true
608
+ Style/RedundantHeredocDelimiterQuotes:
609
+ Description: 'Checks for redundant heredoc delimiter quotes.'
610
+ Enabled: true
611
+ Style/RedundantInitialize:
612
+ Description: 'Checks for redundant `initialize` methods.'
613
+ Enabled: true
614
+ Style/RedundantLineContinuation:
615
+ Description: 'Check for redundant line continuation.'
616
+ Enabled: true
617
+ Style/RedundantRegexpArgument:
618
+ Description: 'Identifies places where argument can be replaced from a deterministic regexp to a string.'
619
+ Enabled: true
620
+ Style/RedundantRegexpConstructor:
621
+ Description: 'Checks for the instantiation of regexp using redundant `Regexp.new` or `Regexp.compile`.'
622
+ Enabled: true
623
+ Style/RedundantSelfAssignmentBranch:
624
+ Description: 'Checks for places where conditional branch makes redundant self-assignment.'
625
+ Enabled: true
626
+ Style/RedundantStringEscape:
627
+ Description: 'Checks for redundant escapes in string literals.'
628
+ Enabled: true
629
+ Style/ReturnNilInPredicateMethodDefinition:
630
+ Description: 'Checks if uses of `return` or `return nil` in predicate method definition.'
631
+ Enabled: true
632
+ Style/SelectByRegexp:
633
+ Description: 'Prefer grep/grep_v to select/reject with a regexp match.'
634
+ Enabled: true
635
+ Style/SingleLineDoEndBlock:
636
+ Description: 'Checks for single-line `do`...`end` blocks.'
637
+ Enabled: true
638
+ Style/StringChars:
639
+ Description: 'Checks for uses of `String#split` with empty string or regexp literal argument.'
640
+ Enabled: true
641
+ Style/SuperWithArgsParentheses:
642
+ Description: 'Use parentheses for `super` with arguments.'
643
+ Enabled: true
644
+ Style/SwapValues:
645
+ Description: 'Enforces the use of shorthand-style swapping of 2 variables.'
646
+ Enabled: true
647
+ Style/YAMLFileRead:
648
+ Description: 'Checks for the use of `YAML.load`, `YAML.safe_load`, and `YAML.parse` with `File.read` argument.'
649
+ Enabled: true
650
+ Style/AccessorGrouping:
651
+ Description: Checks for grouping of accessors in `class` and `module` bodies.
652
+ Enabled: true
653
+ Style/ArrayCoercion:
654
+ Description: >-
655
+ Use Array() instead of explicit Array check or [*var], when dealing
656
+ with a variable you want to treat as an Array, but you're not certain it's an array.
657
+ Enabled: true
658
+ Style/BisectedAttrAccessor:
659
+ Description: >-
660
+ Checks for places where `attr_reader` and `attr_writer`
661
+ for the same method can be combined into single `attr_accessor`.
662
+ Enabled: true
663
+ Style/CaseLikeIf:
664
+ Description: This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.
665
+ Enabled: true
666
+ Style/ExplicitBlockArgument:
667
+ Description: >-
668
+ Consider using explicit block argument to avoid writing block literal
669
+ that just passes its arguments to another block.
670
+ Enabled: true
671
+ Style/ExponentialNotation:
672
+ Description: When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).
673
+ Enabled: true
674
+ Style/GlobalStdStream:
675
+ Description: Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.
676
+ Enabled: true
677
+ Style/HashAsLastArrayItem:
678
+ Description: >-
679
+ Checks for presence or absence of braces around hash literal as a last
680
+ array item depending on configuration.
681
+ Enabled: true
682
+ Style/HashEachMethods:
683
+ Description: Use Hash#each_key and Hash#each_value.
684
+ Enabled: true
685
+ Style/HashLikeCase:
686
+ Description: >-
687
+ Checks for places where `case-when` represents a simple 1:1
688
+ mapping and can be replaced with a hash lookup.
689
+ Enabled: true
690
+ Style/HashTransformKeys:
691
+ Description: Prefer `transform_keys` over `each_with_object`, `map`, or `to_h`.
692
+ Enabled: true
693
+ Style/HashTransformValues:
694
+ Description: Prefer `transform_values` over `each_with_object`, `map`, or `to_h`.
695
+ Enabled: true
696
+ Style/OptionalBooleanParameter:
697
+ Description: Use keyword arguments when defining method with boolean argument.
698
+ Enabled: true
699
+ Style/RedundantAssignment:
700
+ Description: Checks for redundant assignment before returning.
701
+ Enabled: true
702
+ Style/RedundantFetchBlock:
703
+ Description: >-
704
+ Use `fetch(key, value)` instead of `fetch(key) { value }`
705
+ when value has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or is a constant.
706
+ Enabled: true
707
+ Style/RedundantFileExtensionInRequire:
708
+ Description: >-
709
+ Checks for the presence of superfluous `.rb` extension in
710
+ the filename provided to `require` and `require_relative`.
711
+ Enabled: true
712
+ Style/RedundantRegexpCharacterClass:
713
+ Description: Checks for unnecessary single-element Regexp character classes.
714
+ Enabled: true
715
+ Style/RedundantRegexpEscape:
716
+ Description: Checks for redundant escapes in Regexps.
717
+ Enabled: false
718
+ Style/SingleArgumentDig:
719
+ Description: Avoid using single argument dig method.
720
+ Enabled: true
721
+ Style/SlicingWithRange:
722
+ Description: Checks array slicing is done with endless ranges when suitable.
723
+ Enabled: true
724
+ Style/StringConcatenation:
725
+ Description: Checks for places where string concatenation can be replaced with string interpolation.
726
+ Enabled: true
727
+