chefstyle 1.4.2 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f8855b643a12f7609e03fe4fef4bec806eacfc1b609ad3f927fa2750be52c5d
4
- data.tar.gz: 1d2af7269153108d67ce8d02503a6b32226a182907436b80cc57b6583c612386
3
+ metadata.gz: 9bd6b5ab8e9f76500ae01a2f2bef633534cb5f3e92567c0eca54627743f1f121
4
+ data.tar.gz: 6870c8ef17247f5eb13683a6f0036cc496950018c375321b94c538d6d4c5308e
5
5
  SHA512:
6
- metadata.gz: ab7bc2f6b2f3e22d060be4e6e30eacfc171e7fb5bee4f1ac11ca5a4b6cf190745fe79c20b0b4d65c9bee5d0d4b61431a3bedbd7a08a8db4c2a18d6f634af4a25
7
- data.tar.gz: 7b34f9396e79b75b88a726c6b14fb25138197eb087a4bba9dbf31c93eb33a314a8b76ecc1c963c3182981cf99e64595dd766d37a66a9c992de7159775cd5d473
6
+ metadata.gz: 10de957e5aa133094336624705910075a9a8d19020c7a5943b1573047b8261213c80cf95ca9afc3d78576fdb70cffcdff37c02434379eb21e81ba580f7a64704
7
+ data.tar.gz: c35d511fc1dae3b3ffce5a3138686d483dd00bca254d506a88879ee1b3e600dddb5b5bd4717891167eb08da296c0aa2612061e93a5b710cb7c50b018980b3553
@@ -665,26 +665,46 @@ Style/Dir:
665
665
  Style/ExpandPathArguments:
666
666
  Enabled: true
667
667
 
668
- ChefRuby/Ruby27KeywordArgumentWarnings:
668
+ # more code you don't need
669
+ Lint/RedundantSafeNavigation:
670
+ Enabled: true
671
+
672
+ # Eases readability
673
+ Lint/RedundantStringCoercion:
674
+ Enabled: true
675
+
676
+ # unnecessary complexity
677
+ Lint/RedundantWithObject:
678
+ Enabled: true
679
+
680
+ # unnecessary complexity
681
+ Lint/RedundantWithIndex:
682
+ Enabled: true
683
+
684
+ # avoid requiring twice
685
+ Lint/DuplicateRequire:
686
+ Enabled: true
687
+
688
+ Chef/Ruby/Ruby27KeywordArgumentWarnings:
669
689
  Description: Pass options to shell_out helpers without the brackets to avoid Ruby 2.7 deprecation warnings.
670
690
  Enabled: true
671
691
  VersionAdded: '1.3.0'
672
692
 
673
- ChefRuby/UnlessDefinedRequire:
693
+ Chef/Ruby/UnlessDefinedRequire:
674
694
  Description: Workaround RubyGems' slow requires by only running require if the constant isn't already defined
675
695
  Enabled: true
676
696
  VersionAdded: '1.3.0'
677
697
  Include:
678
698
  - 'lib/**/*'
679
699
 
680
- ChefRuby/GemspecRequireRubygems:
700
+ Chef/Ruby/GemspecRequireRubygems:
681
701
  Description: Rubygems does not need to be required in a Gemspec
682
702
  Enabled: true
683
703
  VersionAdded: '1.3.0'
684
704
  Include:
685
705
  - '**/*.gemspec'
686
706
 
687
- ChefRuby/RequireNetHttps:
707
+ Chef/Ruby/RequireNetHttps:
688
708
  Description: net/https is deprecated and just includes net/http and openssl. We should include those directly instead
689
709
  Enabled: true
690
710
  VersionAdded: '1.3.0'
@@ -229,6 +229,8 @@ Lint/DeprecatedOpenSSLConstant:
229
229
  Enabled: false
230
230
  Lint/DisjunctiveAssignmentInConstructor:
231
231
  Enabled: false
232
+ Lint/DuplicateBranch:
233
+ Enabled: false
232
234
  Lint/DuplicateCaseCondition:
233
235
  Enabled: false
234
236
  Lint/DuplicateElsifCondition:
@@ -237,6 +239,8 @@ Lint/DuplicateHashKey:
237
239
  Enabled: false
238
240
  Lint/DuplicateMethods:
239
241
  Enabled: false
242
+ Lint/DuplicateRegexpCharacterClassElement:
243
+ Enabled: false
240
244
  Lint/DuplicateRequire:
241
245
  Enabled: false
242
246
  Lint/DuplicateRescueException:
@@ -245,6 +249,10 @@ Lint/EachWithObjectArgument:
245
249
  Enabled: false
246
250
  Lint/ElseLayout:
247
251
  Enabled: false
252
+ Lint/EmptyBlock:
253
+ Enabled: false
254
+ Lint/EmptyClass:
255
+ Enabled: false
248
256
  Lint/EmptyConditionalBody:
249
257
  Enabled: false
250
258
  Lint/EmptyEnsure:
@@ -269,6 +277,8 @@ Lint/FloatOutOfRange:
269
277
  Enabled: false
270
278
  Lint/FormatParameterMismatch:
271
279
  Enabled: false
280
+ Lint/HashCompareByIdentity:
281
+ Enabled: false
272
282
  Lint/HeredocMethodCallPosition:
273
283
  Enabled: false
274
284
  Lint/IdentityComparison:
@@ -301,6 +311,8 @@ Lint/NestedPercentLiteral:
301
311
  Enabled: false
302
312
  Lint/NextWithoutAccumulator:
303
313
  Enabled: false
314
+ Lint/NoReturnInBeginEndBlocks:
315
+ Enabled: false
304
316
  Lint/NonDeterministicRequireOrder:
305
317
  Enabled: false
306
318
  Lint/NonLocalExitFromIterator:
@@ -327,6 +339,8 @@ Lint/RedundantCopEnableDirective:
327
339
  Enabled: false
328
340
  Lint/RedundantRequireStatement:
329
341
  Enabled: false
342
+ Lint/RedundantSafeNavigation:
343
+ Enabled: false
330
344
  Lint/RedundantSplatExpansion:
331
345
  Enabled: false
332
346
  Lint/RedundantStringCoercion:
@@ -369,6 +383,8 @@ Lint/SuppressedException:
369
383
  Enabled: false
370
384
  Lint/Syntax:
371
385
  Enabled: false
386
+ Lint/ToEnumArguments:
387
+ Enabled: false
372
388
  Lint/ToJSON:
373
389
  Enabled: false
374
390
  Lint/TopLevelReturnWithArgument:
@@ -379,6 +395,8 @@ Lint/UnderscorePrefixedVariableName:
379
395
  Enabled: false
380
396
  Lint/UnifiedInteger:
381
397
  Enabled: false
398
+ Lint/UnmodifiedReduceAccumulator:
399
+ Enabled: false
382
400
  Lint/UnreachableCode:
383
401
  Enabled: false
384
402
  Lint/UnreachableLoop:
@@ -463,6 +481,8 @@ Style/Alias:
463
481
  Enabled: false
464
482
  Style/AndOr:
465
483
  Enabled: false
484
+ Style/ArgumentsForwarding:
485
+ Enabled: false
466
486
  Style/ArrayCoercion:
467
487
  Enabled: false
468
488
  Style/ArrayJoin:
@@ -493,12 +513,16 @@ Style/ClassAndModuleChildren:
493
513
  Enabled: false
494
514
  Style/ClassCheck:
495
515
  Enabled: false
516
+ Style/ClassEqualityComparison:
517
+ Enabled: false
496
518
  Style/ClassMethods:
497
519
  Enabled: false
498
520
  Style/ClassMethodsDefinitions:
499
521
  Enabled: false
500
522
  Style/ClassVars:
501
523
  Enabled: false
524
+ Style/CollectionCompact:
525
+ Enabled: false
502
526
  Style/CollectionMethods:
503
527
  Enabled: false
504
528
  Style/ColonMethodCall:
@@ -531,6 +555,8 @@ Style/DocumentationMethod:
531
555
  Enabled: false
532
556
  Style/Documentation:
533
557
  Enabled: false
558
+ Style/DocumentDynamicEvalDefinition:
559
+ Enabled: false
534
560
  Style/DoubleCopDisableDirective:
535
561
  Enabled: false
536
562
  Style/DoubleNegation:
@@ -635,6 +661,8 @@ Style/RedundantSelfAssignment:
635
661
  Enabled: false
636
662
  Style/SoleNestedConditional:
637
663
  Enabled: false
664
+ Style/StaticClass:
665
+ Enabled: false
638
666
  Style/MethodCalledOnDoEndBlock:
639
667
  Enabled: false
640
668
  Style/MethodDefParentheses:
@@ -671,6 +699,8 @@ Style/MutableConstant:
671
699
  Enabled: false
672
700
  Style/NegatedIf:
673
701
  Enabled: false
702
+ Style/NegatedIfElseCondition:
703
+ Enabled: false
674
704
  Style/NegatedUnless:
675
705
  Enabled: false
676
706
  Style/NegatedWhile:
@@ -685,6 +715,8 @@ Style/Next:
685
715
  Enabled: false
686
716
  Style/NilComparison:
687
717
  Enabled: false
718
+ Style/NilLambda:
719
+ Enabled: false
688
720
  Style/NonNilCheck:
689
721
  Enabled: false
690
722
  Style/Not:
@@ -801,6 +833,8 @@ Style/Strip:
801
833
  Enabled: false
802
834
  Style/StructInheritance:
803
835
  Enabled: false
836
+ Style/SwapValues:
837
+ Enabled: false
804
838
  Style/SymbolArray:
805
839
  Enabled: false
806
840
  Style/SymbolLiteral:
@@ -313,7 +313,7 @@ Layout/AssignmentIndentation:
313
313
 
314
314
  Layout/BeginEndAlignment:
315
315
  Description: 'Align ends corresponding to begins correctly.'
316
- Enabled: pending
316
+ Enabled: true
317
317
  VersionAdded: '0.91'
318
318
  # The value `start_of_line` means that `end` should be aligned the start of the line
319
319
  # where the `begin` keyword is.
@@ -496,7 +496,7 @@ Layout/EmptyLinesAroundArguments:
496
496
  Layout/EmptyLinesAroundAttributeAccessor:
497
497
  Description: "Keep blank lines around attribute accessors."
498
498
  StyleGuide: '#empty-lines-around-attribute-accessor'
499
- Enabled: pending
499
+ Enabled: true
500
500
  VersionAdded: '0.83'
501
501
  VersionChanged: '0.84'
502
502
  AllowAliasSyntax: true
@@ -891,7 +891,7 @@ Layout/LineLength:
891
891
  StyleGuide: '#max-line-length'
892
892
  Enabled: true
893
893
  VersionAdded: '0.25'
894
- VersionChanged: '0.84'
894
+ VersionChanged: '1.3'
895
895
  AutoCorrect: false
896
896
  Max: 120
897
897
  # To make it possible to copy or click on URIs in the code, we allow lines
@@ -1145,7 +1145,7 @@ Layout/SpaceAroundKeyword:
1145
1145
 
1146
1146
  Layout/SpaceAroundMethodCallOperator:
1147
1147
  Description: 'Checks method call operators to not have spaces around them.'
1148
- Enabled: pending
1148
+ Enabled: true
1149
1149
  VersionAdded: '0.82'
1150
1150
 
1151
1151
  Layout/SpaceAroundOperators:
@@ -1334,8 +1334,8 @@ Layout/TrailingWhitespace:
1334
1334
  StyleGuide: '#no-trailing-whitespace'
1335
1335
  Enabled: true
1336
1336
  VersionAdded: '0.49'
1337
- VersionChanged: '0.83'
1338
- AllowInHeredoc: true
1337
+ VersionChanged: '1.0'
1338
+ AllowInHeredoc: false
1339
1339
 
1340
1340
  #################### Lint ##################################
1341
1341
  ### Warnings
@@ -1379,7 +1379,7 @@ Lint/BigDecimalNew:
1379
1379
 
1380
1380
  Lint/BinaryOperatorWithIdenticalOperands:
1381
1381
  Description: 'This cop checks for places where binary operator has identical operands.'
1382
- Enabled: pending
1382
+ Enabled: true
1383
1383
  Safe: false
1384
1384
  VersionAdded: '0.89'
1385
1385
 
@@ -1398,8 +1398,10 @@ Lint/CircularArgumentReference:
1398
1398
  Lint/ConstantDefinitionInBlock:
1399
1399
  Description: 'Do not define constants within a block.'
1400
1400
  StyleGuide: '#no-constant-definition-in-block'
1401
- Enabled: pending
1401
+ Enabled: true
1402
1402
  VersionAdded: '0.91'
1403
+ VersionChanged: '1.3'
1404
+ AllowedMethods: []
1403
1405
 
1404
1406
  Lint/ConstantResolution:
1405
1407
  Description: 'Check that constants are fully qualified with `::`.'
@@ -1415,6 +1417,22 @@ Lint/Debugger:
1415
1417
  Enabled: true
1416
1418
  VersionAdded: '0.14'
1417
1419
  VersionChanged: '0.49'
1420
+ DebuggerReceivers:
1421
+ - binding
1422
+ - Kernel
1423
+ - Pry
1424
+ DebuggerMethods:
1425
+ - debugger
1426
+ - byebug
1427
+ - remote_byebug
1428
+ - pry
1429
+ - remote_pry
1430
+ - pry_remote
1431
+ - console
1432
+ - rescue
1433
+ - save_and_open_page
1434
+ - save_and_open_screenshot
1435
+ - irb
1418
1436
 
1419
1437
  Lint/DeprecatedClassMethods:
1420
1438
  Description: 'Check for deprecated class method calls.'
@@ -1423,7 +1441,7 @@ Lint/DeprecatedClassMethods:
1423
1441
 
1424
1442
  Lint/DeprecatedOpenSSLConstant:
1425
1443
  Description: "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`."
1426
- Enabled: pending
1444
+ Enabled: true
1427
1445
  VersionAdded: '0.84'
1428
1446
 
1429
1447
  Lint/DisjunctiveAssignmentInConstructor:
@@ -1433,6 +1451,11 @@ Lint/DisjunctiveAssignmentInConstructor:
1433
1451
  VersionAdded: '0.62'
1434
1452
  VersionChanged: '0.88'
1435
1453
 
1454
+ Lint/DuplicateBranch:
1455
+ Description: Checks that there are no repeated bodies within `if/unless`, `case-when` and `rescue` constructs.
1456
+ Enabled: pending
1457
+ VersionAdded: '1.3'
1458
+
1436
1459
  Lint/DuplicateCaseCondition:
1437
1460
  Description: 'Do not repeat values in case conditionals.'
1438
1461
  Enabled: true
@@ -1440,7 +1463,7 @@ Lint/DuplicateCaseCondition:
1440
1463
 
1441
1464
  Lint/DuplicateElsifCondition:
1442
1465
  Description: 'Do not repeat conditions used in if `elsif`.'
1443
- Enabled: 'pending'
1466
+ Enabled: true
1444
1467
  VersionAdded: '0.88'
1445
1468
 
1446
1469
  Lint/DuplicateHashKey:
@@ -1454,14 +1477,19 @@ Lint/DuplicateMethods:
1454
1477
  Enabled: true
1455
1478
  VersionAdded: '0.29'
1456
1479
 
1480
+ Lint/DuplicateRegexpCharacterClassElement:
1481
+ Description: 'Checks for duplicate elements in Regexp character classes.'
1482
+ Enabled: pending
1483
+ VersionAdded: '1.1'
1484
+
1457
1485
  Lint/DuplicateRequire:
1458
1486
  Description: 'Check for duplicate `require`s and `require_relative`s.'
1459
- Enabled: pending
1487
+ Enabled: true
1460
1488
  VersionAdded: '0.90'
1461
1489
 
1462
1490
  Lint/DuplicateRescueException:
1463
1491
  Description: 'Checks that there are no repeated exceptions used in `rescue` expressions.'
1464
- Enabled: pending
1492
+ Enabled: true
1465
1493
  VersionAdded: '0.89'
1466
1494
 
1467
1495
  Lint/EachWithObjectArgument:
@@ -1473,10 +1501,25 @@ Lint/ElseLayout:
1473
1501
  Description: 'Check for odd code arrangement in an else block.'
1474
1502
  Enabled: true
1475
1503
  VersionAdded: '0.17'
1504
+ VersionChanged: '1.2'
1505
+
1506
+ Lint/EmptyBlock:
1507
+ Description: 'This cop checks for blocks without a body.'
1508
+ Enabled: pending
1509
+ VersionAdded: '1.1'
1510
+ VersionChanged: '1.3'
1511
+ AllowComments: true
1512
+ AllowEmptyLambdas: true
1513
+
1514
+ Lint/EmptyClass:
1515
+ Description: 'Checks for classes and metaclasses without a body.'
1516
+ Enabled: pending
1517
+ VersionAdded: '1.3'
1518
+ AllowComments: false
1476
1519
 
1477
1520
  Lint/EmptyConditionalBody:
1478
1521
  Description: 'This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.'
1479
- Enabled: 'pending'
1522
+ Enabled: true
1480
1523
  AllowComments: true
1481
1524
  VersionAdded: '0.89'
1482
1525
 
@@ -1493,7 +1536,7 @@ Lint/EmptyExpression:
1493
1536
 
1494
1537
  Lint/EmptyFile:
1495
1538
  Description: 'Enforces that Ruby source files are not empty.'
1496
- Enabled: pending
1539
+ Enabled: true
1497
1540
  AllowComments: true
1498
1541
  VersionAdded: '0.90'
1499
1542
 
@@ -1531,7 +1574,7 @@ Lint/FlipFlop:
1531
1574
  Lint/FloatComparison:
1532
1575
  Description: 'Checks for the presence of precise comparison of floating point numbers.'
1533
1576
  StyleGuide: '#float-comparison'
1534
- Enabled: pending
1577
+ Enabled: true
1535
1578
  VersionAdded: '0.89'
1536
1579
 
1537
1580
  Lint/FloatOutOfRange:
@@ -1546,6 +1589,13 @@ Lint/FormatParameterMismatch:
1546
1589
  Enabled: true
1547
1590
  VersionAdded: '0.33'
1548
1591
 
1592
+ Lint/HashCompareByIdentity:
1593
+ Description: 'Prefer using `Hash#compare_by_identity` than using `object_id` for keys.'
1594
+ StyleGuide: '#identity-comparison'
1595
+ Enabled: true
1596
+ Safe: false
1597
+ VersionAdded: '0.93'
1598
+
1549
1599
  Lint/HeredocMethodCallPosition:
1550
1600
  Description: >-
1551
1601
  Checks for the ordering of a method call where
@@ -1556,7 +1606,7 @@ Lint/HeredocMethodCallPosition:
1556
1606
 
1557
1607
  Lint/IdentityComparison:
1558
1608
  Description: 'Prefer `equal?` over `==` when comparing `object_id`.'
1559
- Enabled: pending
1609
+ Enabled: true
1560
1610
  StyleGuide: '#identity-comparison'
1561
1611
  VersionAdded: '0.91'
1562
1612
 
@@ -1609,7 +1659,8 @@ Lint/Loop:
1609
1659
  StyleGuide: '#loop-with-break'
1610
1660
  Enabled: true
1611
1661
  VersionAdded: '0.9'
1612
- VersionChanged: '0.89'
1662
+ VersionChanged: '1.3'
1663
+ Safe: false
1613
1664
 
1614
1665
  Lint/MissingCopEnableDirective:
1615
1666
  Description: 'Checks for a `# rubocop:enable` after `# rubocop:disable`.'
@@ -1628,19 +1679,20 @@ Lint/MissingSuper:
1628
1679
  Description: >-
1629
1680
  This cop checks for the presence of constructors and lifecycle callbacks
1630
1681
  without calls to `super`'.
1631
- Enabled: pending
1682
+ Enabled: true
1632
1683
  VersionAdded: '0.89'
1633
1684
 
1634
1685
  Lint/MixedRegexpCaptureTypes:
1635
1686
  Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
1636
- Enabled: pending
1687
+ Enabled: true
1637
1688
  VersionAdded: '0.85'
1638
1689
 
1639
1690
  Lint/MultipleComparison:
1640
1691
  Description: "Use `&&` operator to compare multiple values."
1641
1692
  Enabled: true
1642
1693
  VersionAdded: '0.47'
1643
- VersionChanged: '0.77'
1694
+ VersionChanged: '1.1'
1695
+ AllowMethodComparison: true
1644
1696
 
1645
1697
  Lint/NestedMethodDefinition:
1646
1698
  Description: 'Do not use nested method definitions.'
@@ -1660,6 +1712,11 @@ Lint/NextWithoutAccumulator:
1660
1712
  Enabled: true
1661
1713
  VersionAdded: '0.36'
1662
1714
 
1715
+ Lint/NoReturnInBeginEndBlocks:
1716
+ Description: 'Do not `return` inside `begin..end` blocks in assignment contexts.'
1717
+ Enabled: pending
1718
+ VersionAdded: '1.2'
1719
+
1663
1720
  Lint/NonDeterministicRequireOrder:
1664
1721
  Description: 'Always sort arrays returned by Dir.glob when requiring files.'
1665
1722
  Enabled: true
@@ -1675,8 +1732,12 @@ Lint/NumberConversion:
1675
1732
  Description: 'Checks unsafe usage of number conversion methods.'
1676
1733
  Enabled: false
1677
1734
  VersionAdded: '0.53'
1678
- VersionChanged: '0.70'
1735
+ VersionChanged: '1.1'
1679
1736
  SafeAutoCorrect: false
1737
+ IgnoredMethods: []
1738
+ IgnoredClasses:
1739
+ - Time
1740
+ - DateTime
1680
1741
 
1681
1742
  Lint/OrderedMagicComments:
1682
1743
  Description: 'Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.'
@@ -1685,7 +1746,7 @@ Lint/OrderedMagicComments:
1685
1746
 
1686
1747
  Lint/OutOfRangeRegexpRef:
1687
1748
  Description: 'Checks for out of range reference for Regexp because it always returns nil.'
1688
- Enabled: pending
1749
+ Enabled: true
1689
1750
  Safe: false
1690
1751
  VersionAdded: '0.89'
1691
1752
 
@@ -1714,7 +1775,7 @@ Lint/PercentSymbolArray:
1714
1775
  Lint/RaiseException:
1715
1776
  Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
1716
1777
  StyleGuide: '#raise-exception'
1717
- Enabled: pending
1778
+ Enabled: true
1718
1779
  Safe: false
1719
1780
  VersionAdded: '0.81'
1720
1781
  VersionChanged: '0.86'
@@ -1746,6 +1807,19 @@ Lint/RedundantRequireStatement:
1746
1807
  Enabled: true
1747
1808
  VersionAdded: '0.76'
1748
1809
 
1810
+ Lint/RedundantSafeNavigation:
1811
+ Description: 'Checks for redundant safe navigation calls.'
1812
+ Enabled: true
1813
+ VersionAdded: '0.93'
1814
+ AllowedMethods:
1815
+ - instance_of?
1816
+ - kind_of?
1817
+ - is_a?
1818
+ - eql?
1819
+ - respond_to?
1820
+ - equal?
1821
+ Safe: false
1822
+
1749
1823
  Lint/RedundantSplatExpansion:
1750
1824
  Description: 'Checks for splat unnecessarily being called on literals.'
1751
1825
  Enabled: true
@@ -1842,7 +1916,7 @@ Lint/ScriptPermission:
1842
1916
 
1843
1917
  Lint/SelfAssignment:
1844
1918
  Description: 'Checks for self-assignments.'
1845
- Enabled: pending
1919
+ Enabled: true
1846
1920
  VersionAdded: '0.89'
1847
1921
 
1848
1922
  Lint/SendWithMixinArgument:
@@ -1873,7 +1947,7 @@ Lint/ShadowingOuterLocalVariable:
1873
1947
 
1874
1948
  Lint/StructNewOverride:
1875
1949
  Description: 'Disallow overriding the `Struct` built-in methods via `Struct.new`.'
1876
- Enabled: pending
1950
+ Enabled: true
1877
1951
  VersionAdded: '0.81'
1878
1952
 
1879
1953
  Lint/SuppressedException:
@@ -1890,6 +1964,11 @@ Lint/Syntax:
1890
1964
  VersionAdded: '0.9'
1891
1965
 
1892
1966
 
1967
+ Lint/ToEnumArguments:
1968
+ Description: 'This cop ensures that `to_enum`/`enum_for`, called for the current method, has correct arguments.'
1969
+ Enabled: pending
1970
+ VersionAdded: '1.1'
1971
+
1893
1972
  Lint/ToJSON:
1894
1973
  Description: 'Ensure #to_json includes an optional argument.'
1895
1974
  Enabled: true
@@ -1897,12 +1976,12 @@ Lint/ToJSON:
1897
1976
 
1898
1977
  Lint/TopLevelReturnWithArgument:
1899
1978
  Description: 'This cop detects top level return statements with argument.'
1900
- Enabled: 'pending'
1979
+ Enabled: true
1901
1980
  VersionAdded: '0.89'
1902
1981
 
1903
1982
  Lint/TrailingCommaInAttributeDeclaration:
1904
1983
  Description: 'This cop checks for trailing commas in attribute declarations.'
1905
- Enabled: pending
1984
+ Enabled: true
1906
1985
  VersionAdded: '0.90'
1907
1986
 
1908
1987
  Lint/UnderscorePrefixedVariableName:
@@ -1916,6 +1995,11 @@ Lint/UnifiedInteger:
1916
1995
  Enabled: true
1917
1996
  VersionAdded: '0.43'
1918
1997
 
1998
+ Lint/UnmodifiedReduceAccumulator:
1999
+ Description: Checks for `reduce` or `inject` blocks that do not update the accumulator each iteration.
2000
+ Enabled: pending
2001
+ VersionAdded: '1.1'
2002
+
1919
2003
  Lint/UnreachableCode:
1920
2004
  Description: 'Unreachable code.'
1921
2005
  Enabled: true
@@ -1923,7 +2007,7 @@ Lint/UnreachableCode:
1923
2007
 
1924
2008
  Lint/UnreachableLoop:
1925
2009
  Description: 'This cop checks for loops that will have at most one iteration.'
1926
- Enabled: pending
2010
+ Enabled: true
1927
2011
  VersionAdded: '0.89'
1928
2012
 
1929
2013
  Lint/UnusedBlockArgument:
@@ -1982,7 +2066,7 @@ Lint/UselessElseWithoutRescue:
1982
2066
 
1983
2067
  Lint/UselessMethodDefinition:
1984
2068
  Description: 'Checks for useless method definitions.'
1985
- Enabled: pending
2069
+ Enabled: true
1986
2070
  VersionAdded: '0.90'
1987
2071
  Safe: false
1988
2072
  AllowComments: true
@@ -1990,13 +2074,14 @@ Lint/UselessMethodDefinition:
1990
2074
  Lint/UselessSetterCall:
1991
2075
  Description: 'Checks for useless setter call to a local variable.'
1992
2076
  Enabled: true
2077
+ SafeAutoCorrect: false
1993
2078
  VersionAdded: '0.13'
1994
- VersionChanged: '0.80'
2079
+ VersionChanged: '1.2'
1995
2080
  Safe: false
1996
2081
 
1997
2082
  Lint/UselessTimes:
1998
2083
  Description: 'Checks for useless `Integer#times` calls.'
1999
- Enabled: pending
2084
+ Enabled: true
2000
2085
  VersionAdded: '0.91'
2001
2086
  Safe: false
2002
2087
 
@@ -2135,6 +2220,7 @@ Naming/BinaryOperatorParameterName:
2135
2220
  StyleGuide: '#other-arg'
2136
2221
  Enabled: true
2137
2222
  VersionAdded: '0.50'
2223
+ VersionChanged: '1.2'
2138
2224
 
2139
2225
  Naming/BlockParameterName:
2140
2226
  Description: >-
@@ -2241,6 +2327,7 @@ Naming/HeredocDelimiterCase:
2241
2327
  StyleGuide: '#heredoc-delimiters'
2242
2328
  Enabled: true
2243
2329
  VersionAdded: '0.50'
2330
+ VersionChanged: '1.2'
2244
2331
  EnforcedStyle: uppercase
2245
2332
  SupportedStyles:
2246
2333
  - lowercase
@@ -2259,7 +2346,7 @@ Naming/MemoizedInstanceVariableName:
2259
2346
  Memoized method name should match memo instance variable name.
2260
2347
  Enabled: true
2261
2348
  VersionAdded: '0.53'
2262
- VersionChanged: '0.58'
2349
+ VersionChanged: '1.2'
2263
2350
  EnforcedStyleForLeadingUnderscores: disallowed
2264
2351
  SupportedStylesForLeadingUnderscores:
2265
2352
  - disallowed
@@ -2357,14 +2444,19 @@ Naming/VariableName:
2357
2444
  - camelCase
2358
2445
 
2359
2446
  Naming/VariableNumber:
2360
- Description: 'Use the configured style when numbering variables.'
2447
+ Description: 'Use the configured style when numbering symbols, methods and variables.'
2448
+ StyleGuide: '#snake-case-symbols-methods-vars-with-numbers'
2361
2449
  Enabled: true
2362
2450
  VersionAdded: '0.50'
2451
+ VersionChanged: '1.3'
2363
2452
  EnforcedStyle: normalcase
2364
2453
  SupportedStyles:
2365
2454
  - snake_case
2366
2455
  - normalcase
2367
2456
  - non_integer
2457
+ CheckMethodNames: true
2458
+ CheckSymbols: true
2459
+ AllowedIdentifiers: []
2368
2460
 
2369
2461
  #################### Security ##############################
2370
2462
 
@@ -2395,9 +2487,10 @@ Security/MarshalLoad:
2395
2487
  VersionAdded: '0.47'
2396
2488
 
2397
2489
  Security/Open:
2398
- Description: 'The use of Kernel#open represents a serious security risk.'
2490
+ Description: 'The use of `Kernel#open` and `URI.open` represent a serious security risk.'
2399
2491
  Enabled: true
2400
2492
  VersionAdded: '0.53'
2493
+ VersionChanged: '1.0'
2401
2494
  Safe: false
2402
2495
 
2403
2496
  Security/YAMLLoad:
@@ -2424,7 +2517,7 @@ Style/AccessModifierDeclarations:
2424
2517
 
2425
2518
  Style/AccessorGrouping:
2426
2519
  Description: 'Checks for grouping of accessors in `class` and `module` bodies.'
2427
- Enabled: 'pending'
2520
+ Enabled: true
2428
2521
  VersionAdded: '0.87'
2429
2522
  EnforcedStyle: grouped
2430
2523
  SupportedStyles:
@@ -2457,6 +2550,13 @@ Style/AndOr:
2457
2550
  - always
2458
2551
  - conditionals
2459
2552
 
2553
+ Style/ArgumentsForwarding:
2554
+ Description: 'Use arguments forwarding.'
2555
+ StyleGuide: '#arguments-forwarding'
2556
+ Enabled: pending
2557
+ AllowOnlyRestArgument: true
2558
+ VersionAdded: '1.1'
2559
+
2460
2560
  Style/ArrayCoercion:
2461
2561
  Description: >-
2462
2562
  Use Array() instead of explicit Array check or [*var], when dealing
@@ -2513,7 +2613,7 @@ Style/BisectedAttrAccessor:
2513
2613
  Description: >-
2514
2614
  Checks for places where `attr_reader` and `attr_writer`
2515
2615
  for the same method can be combined into single `attr_accessor`.
2516
- Enabled: 'pending'
2616
+ Enabled: true
2517
2617
  VersionAdded: '0.87'
2518
2618
 
2519
2619
  Style/BlockComments:
@@ -2652,7 +2752,7 @@ Style/CaseEquality:
2652
2752
  Style/CaseLikeIf:
2653
2753
  Description: 'This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.'
2654
2754
  StyleGuide: '#case-vs-if-else'
2655
- Enabled: 'pending'
2755
+ Enabled: true
2656
2756
  Safe: false
2657
2757
  VersionAdded: '0.88'
2658
2758
 
@@ -2702,6 +2802,16 @@ Style/ClassCheck:
2702
2802
  - is_a?
2703
2803
  - kind_of?
2704
2804
 
2805
+ Style/ClassEqualityComparison:
2806
+ Description: 'Enforces the use of `Object#instance_of?` instead of class comparison for equality.'
2807
+ StyleGuide: '#instance-of-vs-class-comparison'
2808
+ Enabled: true
2809
+ VersionAdded: '0.93'
2810
+ IgnoredMethods:
2811
+ - ==
2812
+ - equal?
2813
+ - eql?
2814
+
2705
2815
  Style/ClassMethods:
2706
2816
  Description: 'Use self when defining module/class methods.'
2707
2817
  StyleGuide: '#def-self-class-methods'
@@ -2725,6 +2835,13 @@ Style/ClassVars:
2725
2835
  Enabled: true
2726
2836
  VersionAdded: '0.13'
2727
2837
 
2838
+ Style/CollectionCompact:
2839
+ Description: 'Use `{Array,Hash}#{compact,compact!}` instead of custom logic to reject nils.'
2840
+ Enabled: pending
2841
+ Safe: false
2842
+ VersionAdded: '1.2'
2843
+ VersionChanged: '1.3'
2844
+
2728
2845
  # Align with the style guide.
2729
2846
  Style/CollectionMethods:
2730
2847
  Description: 'Preferred collection methods.'
@@ -2763,7 +2880,7 @@ Style/CombinableLoops:
2763
2880
  Description: >-
2764
2881
  Checks for places where multiple consecutive loops over the same data
2765
2882
  can be combined into a single loop.
2766
- Enabled: pending
2883
+ Enabled: true
2767
2884
  Safe: false
2768
2885
  VersionAdded: '0.90'
2769
2886
 
@@ -2788,17 +2905,18 @@ Style/CommandLiteral:
2788
2905
  Style/CommentAnnotation:
2789
2906
  Description: >-
2790
2907
  Checks formatting of special comments
2791
- (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
2908
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE).
2792
2909
  StyleGuide: '#annotate-keywords'
2793
2910
  Enabled: true
2794
2911
  VersionAdded: '0.10'
2795
- VersionChanged: '0.31'
2912
+ VersionChanged: '1.3'
2796
2913
  Keywords:
2797
2914
  - TODO
2798
2915
  - FIXME
2799
2916
  - OPTIMIZE
2800
2917
  - HACK
2801
2918
  - REVIEW
2919
+ - NOTE
2802
2920
 
2803
2921
  Style/CommentedKeyword:
2804
2922
  Description: 'Do not place comments on the same line as certain keywords.'
@@ -2887,6 +3005,15 @@ Style/DisableCopsWithinSourceCodeDirective:
2887
3005
  Enabled: false
2888
3006
  VersionAdded: '0.82'
2889
3007
 
3008
+ Style/DocumentDynamicEvalDefinition:
3009
+ Description: >-
3010
+ When using `class_eval` (or other `eval`) with string interpolation,
3011
+ add a comment block showing its appearance if interpolated.
3012
+ StyleGuide: '#eval-comment-docs'
3013
+ Enabled: pending
3014
+ VersionAdded: '1.1'
3015
+ VersionChanged: '1.3'
3016
+
2890
3017
  Style/Documentation:
2891
3018
  Description: 'Document classes and non-namespace modules.'
2892
3019
  Enabled: true
@@ -2914,7 +3041,7 @@ Style/DoubleNegation:
2914
3041
  StyleGuide: '#no-bang-bang'
2915
3042
  Enabled: true
2916
3043
  VersionAdded: '0.19'
2917
- VersionChanged: '0.84'
3044
+ VersionChanged: '1.2'
2918
3045
  EnforcedStyle: allowed_in_returns
2919
3046
  SafeAutoCorrect: false
2920
3047
  SupportedStyles:
@@ -3016,7 +3143,7 @@ Style/ExplicitBlockArgument:
3016
3143
  Consider using explicit block argument to avoid writing block literal
3017
3144
  that just passes its arguments to another block.
3018
3145
  StyleGuide: '#block-argument'
3019
- Enabled: pending
3146
+ Enabled: true
3020
3147
  # May change the yielding arity.
3021
3148
  Safe: false
3022
3149
  VersionAdded: '0.89'
@@ -3024,7 +3151,7 @@ Style/ExplicitBlockArgument:
3024
3151
  Style/ExponentialNotation:
3025
3152
  Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
3026
3153
  StyleGuide: '#exponential-notation'
3027
- Enabled: pending
3154
+ Enabled: true
3028
3155
  VersionAdded: '0.82'
3029
3156
  EnforcedStyle: scientific
3030
3157
  SupportedStyles:
@@ -3079,8 +3206,12 @@ Style/FormatStringToken:
3079
3206
  # Prefer simple looking "template" style tokens like `%{name}`, `%{age}`
3080
3207
  - template
3081
3208
  - unannotated
3209
+ # `MaxUnannotatedPlaceholdersAllowed` defines the number of `unannotated`
3210
+ # style token in a format string to be allowed when enforced style is not
3211
+ # `unannotated`.
3212
+ MaxUnannotatedPlaceholdersAllowed: 1
3082
3213
  VersionAdded: '0.49'
3083
- VersionChanged: '0.75'
3214
+ VersionChanged: '1.0'
3084
3215
 
3085
3216
  Style/FrozenStringLiteralComment:
3086
3217
  Description: >-
@@ -3107,7 +3238,7 @@ Style/FrozenStringLiteralComment:
3107
3238
  Style/GlobalStdStream:
3108
3239
  Description: 'Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.'
3109
3240
  StyleGuide: '#global-stdout'
3110
- Enabled: pending
3241
+ Enabled: true
3111
3242
  VersionAdded: '0.89'
3112
3243
  SafeAutoCorrect: false
3113
3244
 
@@ -3135,7 +3266,7 @@ Style/HashAsLastArrayItem:
3135
3266
  Checks for presence or absence of braces around hash literal as a last
3136
3267
  array item depending on configuration.
3137
3268
  StyleGuide: '#hash-literal-as-last-array-item'
3138
- Enabled: 'pending'
3269
+ Enabled: true
3139
3270
  VersionAdded: '0.88'
3140
3271
  EnforcedStyle: braces
3141
3272
  SupportedStyles:
@@ -3145,7 +3276,7 @@ Style/HashAsLastArrayItem:
3145
3276
  Style/HashEachMethods:
3146
3277
  Description: 'Use Hash#each_key and Hash#each_value.'
3147
3278
  StyleGuide: '#hash-each'
3148
- Enabled: pending
3279
+ Enabled: true
3149
3280
  VersionAdded: '0.80'
3150
3281
  Safe: false
3151
3282
 
@@ -3153,7 +3284,7 @@ Style/HashLikeCase:
3153
3284
  Description: >-
3154
3285
  Checks for places where `case-when` represents a simple 1:1
3155
3286
  mapping and can be replaced with a hash lookup.
3156
- Enabled: 'pending'
3287
+ Enabled: true
3157
3288
  VersionAdded: '0.88'
3158
3289
  # `MinBranchesCount` defines the number of branches `case` needs to have
3159
3290
  # to trigger this cop
@@ -3184,14 +3315,14 @@ Style/HashSyntax:
3184
3315
 
3185
3316
  Style/HashTransformKeys:
3186
3317
  Description: 'Prefer `transform_keys` over `each_with_object`, `map`, or `to_h`.'
3187
- Enabled: 'pending'
3318
+ Enabled: true
3188
3319
  VersionAdded: '0.80'
3189
3320
  VersionChanged: '0.90'
3190
3321
  Safe: false
3191
3322
 
3192
3323
  Style/HashTransformValues:
3193
3324
  Description: 'Prefer `transform_values` over `each_with_object`, `map`, or `to_h`.'
3194
- Enabled: 'pending'
3325
+ Enabled: true
3195
3326
  VersionAdded: '0.80'
3196
3327
  VersionChanged: '0.90'
3197
3328
  Safe: false
@@ -3209,6 +3340,7 @@ Style/IfInsideElse:
3209
3340
  Enabled: true
3210
3341
  AllowIfModifier: false
3211
3342
  VersionAdded: '0.36'
3343
+ VersionChanged: '1.3'
3212
3344
 
3213
3345
  Style/IfUnlessModifier:
3214
3346
  Description: >-
@@ -3241,12 +3373,14 @@ Style/ImplicitRuntimeError:
3241
3373
  VersionAdded: '0.41'
3242
3374
 
3243
3375
  Style/InfiniteLoop:
3244
- Description: 'Use Kernel#loop for infinite loops.'
3376
+ Description: >-
3377
+ Use Kernel#loop for infinite loops.
3378
+ This cop is unsafe in the body may raise a `StopIteration` exception.
3379
+ Safe: false
3245
3380
  StyleGuide: '#infinite-loop'
3246
3381
  Enabled: true
3247
3382
  VersionAdded: '0.26'
3248
3383
  VersionChanged: '0.61'
3249
- SafeAutoCorrect: true
3250
3384
 
3251
3385
  Style/InlineComment:
3252
3386
  Description: 'Avoid trailing inline comments.'
@@ -3298,7 +3432,7 @@ Style/IpAddresses:
3298
3432
  Style/KeywordParametersOrder:
3299
3433
  Description: 'Enforces that optional keyword parameters are placed at the end of the parameters list.'
3300
3434
  StyleGuide: '#keyword-parameters-order'
3301
- Enabled: pending
3435
+ Enabled: true
3302
3436
  VersionAdded: '0.90'
3303
3437
 
3304
3438
  Style/Lambda:
@@ -3500,6 +3634,7 @@ Style/MultipleComparison:
3500
3634
  use Array#include? instead.
3501
3635
  Enabled: true
3502
3636
  VersionAdded: '0.49'
3637
+ VersionChanged: '1.1'
3503
3638
 
3504
3639
  Style/MutableConstant:
3505
3640
  Description: 'Do not assign mutable objects to constants.'
@@ -3534,6 +3669,13 @@ Style/NegatedIf:
3534
3669
  - prefix
3535
3670
  - postfix
3536
3671
 
3672
+ Style/NegatedIfElseCondition:
3673
+ Description: >-
3674
+ This cop checks for uses of `if-else` and ternary operators with a negated condition
3675
+ which can be simplified by inverting condition and swapping branches.
3676
+ Enabled: pending
3677
+ VersionAdded: '1.2'
3678
+
3537
3679
  Style/NegatedUnless:
3538
3680
  Description: 'Favor if over unless for negative conditions.'
3539
3681
  StyleGuide: '#if-for-negatives'
@@ -3621,6 +3763,11 @@ Style/NilComparison:
3621
3763
  - predicate
3622
3764
  - comparison
3623
3765
 
3766
+ Style/NilLambda:
3767
+ Description: 'Prefer `-> {}` to `-> { nil }`.'
3768
+ Enabled: pending
3769
+ VersionAdded: '1.3'
3770
+
3624
3771
  Style/NonNilCheck:
3625
3772
  Description: 'Checks for redundant nil checks.'
3626
3773
  StyleGuide: '#no-non-nil-checks'
@@ -3723,7 +3870,7 @@ Style/OptionalArguments:
3723
3870
  Style/OptionalBooleanParameter:
3724
3871
  Description: 'Use keyword arguments when defining method with boolean argument.'
3725
3872
  StyleGuide: '#boolean-keyword-arguments'
3726
- Enabled: pending
3873
+ Enabled: true
3727
3874
  Safe: false
3728
3875
  VersionAdded: '0.89'
3729
3876
  AllowedMethods:
@@ -3811,11 +3958,12 @@ Style/RaiseArgs:
3811
3958
  StyleGuide: '#exception-class-messages'
3812
3959
  Enabled: true
3813
3960
  VersionAdded: '0.14'
3814
- VersionChanged: '0.40'
3961
+ VersionChanged: '1.2'
3815
3962
  EnforcedStyle: exploded
3816
3963
  SupportedStyles:
3817
3964
  - compact # raise Exception.new(msg)
3818
3965
  - exploded # raise Exception, msg
3966
+ AllowedCompactTypes: []
3819
3967
 
3820
3968
  Style/RandomWithOffset:
3821
3969
  Description: >-
@@ -3827,7 +3975,7 @@ Style/RandomWithOffset:
3827
3975
 
3828
3976
  Style/RedundantAssignment:
3829
3977
  Description: 'Checks for redundant assignment before returning.'
3830
- Enabled: 'pending'
3978
+ Enabled: true
3831
3979
  VersionAdded: '0.87'
3832
3980
 
3833
3981
  Style/RedundantBegin:
@@ -3864,7 +4012,7 @@ Style/RedundantFetchBlock:
3864
4012
  Use `fetch(key, value)` instead of `fetch(key) { value }`
3865
4013
  when value has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or is a constant.
3866
4014
  Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashfetch-with-argument-vs-hashfetch--block-code'
3867
- Enabled: 'pending'
4015
+ Enabled: true
3868
4016
  Safe: false
3869
4017
  # If enabled, this cop will autocorrect usages of
3870
4018
  # `fetch` being called with block returning a constant.
@@ -3877,7 +4025,7 @@ Style/RedundantFileExtensionInRequire:
3877
4025
  Checks for the presence of superfluous `.rb` extension in
3878
4026
  the filename provided to `require` and `require_relative`.
3879
4027
  StyleGuide: '#no-explicit-rb-to-require'
3880
- Enabled: 'pending'
4028
+ Enabled: true
3881
4029
  VersionAdded: '0.88'
3882
4030
 
3883
4031
  Style/RedundantFreeze:
@@ -3904,12 +4052,12 @@ Style/RedundantPercentQ:
3904
4052
 
3905
4053
  Style/RedundantRegexpCharacterClass:
3906
4054
  Description: 'Checks for unnecessary single-element Regexp character classes.'
3907
- Enabled: pending
4055
+ Enabled: true
3908
4056
  VersionAdded: '0.85'
3909
4057
 
3910
4058
  Style/RedundantRegexpEscape:
3911
4059
  Description: 'Checks for redundant escapes in Regexps.'
3912
- Enabled: pending
4060
+ Enabled: true
3913
4061
  VersionAdded: '0.85'
3914
4062
 
3915
4063
  Style/RedundantReturn:
@@ -3930,7 +4078,7 @@ Style/RedundantSelf:
3930
4078
 
3931
4079
  Style/RedundantSelfAssignment:
3932
4080
  Description: 'Checks for places where redundant assignments are made for in place modification methods.'
3933
- Enabled: pending
4081
+ Enabled: true
3934
4082
  Safe: false
3935
4083
  VersionAdded: '0.90'
3936
4084
 
@@ -4058,7 +4206,7 @@ Style/SignalException:
4058
4206
 
4059
4207
  Style/SingleArgumentDig:
4060
4208
  Description: 'Avoid using single argument dig method.'
4061
- Enabled: pending
4209
+ Enabled: true
4062
4210
  VersionAdded: '0.89'
4063
4211
  Safe: false
4064
4212
 
@@ -4085,7 +4233,7 @@ Style/SingleLineMethods:
4085
4233
 
4086
4234
  Style/SlicingWithRange:
4087
4235
  Description: 'Checks array slicing is done with endless ranges when suitable.'
4088
- Enabled: pending
4236
+ Enabled: true
4089
4237
  VersionAdded: '0.83'
4090
4238
  Safe: false
4091
4239
 
@@ -4093,7 +4241,7 @@ Style/SoleNestedConditional:
4093
4241
  Description: >-
4094
4242
  Finds sole nested conditional nodes
4095
4243
  which can be merged into outer conditional node.
4096
- Enabled: pending
4244
+ Enabled: true
4097
4245
  VersionAdded: '0.89'
4098
4246
  AllowModifier: false
4099
4247
 
@@ -4119,6 +4267,13 @@ Style/StabbyLambdaParentheses:
4119
4267
  - require_parentheses
4120
4268
  - require_no_parentheses
4121
4269
 
4270
+ Style/StaticClass:
4271
+ Description: 'Prefer modules to classes with only class methods.'
4272
+ StyleGuide: '#modules-vs-classes'
4273
+ Enabled: false
4274
+ Safe: false
4275
+ VersionAdded: '1.3'
4276
+
4122
4277
  Style/StderrPuts:
4123
4278
  Description: 'Use `warn` instead of `$stderr.puts`.'
4124
4279
  StyleGuide: '#warn'
@@ -4128,7 +4283,7 @@ Style/StderrPuts:
4128
4283
  Style/StringConcatenation:
4129
4284
  Description: 'Checks for places where string concatenation can be replaced with string interpolation.'
4130
4285
  StyleGuide: '#string-interpolation'
4131
- Enabled: pending
4286
+ Enabled: true
4132
4287
  Safe: false
4133
4288
  VersionAdded: '0.89'
4134
4289
 
@@ -4191,6 +4346,13 @@ Style/StructInheritance:
4191
4346
  VersionAdded: '0.29'
4192
4347
  VersionChanged: '0.86'
4193
4348
 
4349
+ Style/SwapValues:
4350
+ Description: 'This cop enforces the use of shorthand-style swapping of 2 variables.'
4351
+ StyleGuide: '#values-swapping'
4352
+ Enabled: pending
4353
+ VersionAdded: '1.1'
4354
+ SafeAutoCorrect: false
4355
+
4194
4356
  Style/SymbolArray:
4195
4357
  Description: 'Use %i or %I for arrays of symbols.'
4196
4358
  StyleGuide: '#percent-i'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Chefstyle
3
- VERSION = "1.4.2"
4
- RUBOCOP_VERSION = "0.92.0"
3
+ VERSION = "1.5.1"
4
+ RUBOCOP_VERSION = "1.3.0"
5
5
  end
@@ -19,7 +19,7 @@
19
19
  module RuboCop
20
20
  module Cop
21
21
  module Chef
22
- module ChefRuby
22
+ module Ruby
23
23
  # Rubygems does not need to be required in a Gemspec. It's already loaded out of the box in Ruby now.
24
24
  class GemspecRequireRubygems < Base
25
25
  extend RuboCop::Cop::AutoCorrector
@@ -19,7 +19,7 @@
19
19
  module RuboCop
20
20
  module Cop
21
21
  module Chef
22
- module ChefRuby
22
+ module Ruby
23
23
  # net/https is deprecated and just includes net/http and openssl. We should include those directly instead.
24
24
  #
25
25
  # @example
@@ -19,7 +19,7 @@
19
19
  module RuboCop
20
20
  module Cop
21
21
  module Chef
22
- module ChefRuby
22
+ module Ruby
23
23
  # Pass options to shell_out helpers without the brackets to avoid Ruby 2.7 deprecation warnings.
24
24
  #
25
25
  # @example
@@ -19,7 +19,7 @@
19
19
  module RuboCop
20
20
  module Cop
21
21
  module Chef
22
- module ChefRuby
22
+ module Ruby
23
23
  # Rubygems is VERY slow to require gems even if they've already been loaded. To work around this
24
24
  # wrap your require statement with an `if defined?()` check.
25
25
  #
@@ -95,7 +95,6 @@ module RuboCop
95
95
  "win32/registry" => "Win32::Registry",
96
96
  "win32ole" => "WIN32OLE",
97
97
  "winrm" => "WinRM::Connection",
98
- "yaml" => "YAML",
99
98
  "yard" => "YARD",
100
99
  "zip" => "Zip",
101
100
  "zlib" => "Zlib",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chefstyle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-28 00:00:00.000000000 Z
11
+ date: 2020-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.92.0
19
+ version: 1.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.92.0
26
+ version: 1.3.0
27
27
  description:
28
28
  email:
29
29
  - oss@chef.io