cookstyle 6.14.7 → 6.15.3
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.
- checksums.yaml +4 -4
- data/config/cookstyle.yml +45 -8
- data/config/disable_all.yml +28 -4
- data/config/upstream.yml +96 -16
- data/cookstyle.gemspec +1 -0
- data/lib/cookstyle/version.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/poise_archive.rb +2 -0
- data/lib/rubocop/cop/chef/deprecation/resource_uses_only_resource_name.rb +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 52ca43d4f012f7af91001dfbe12b7a535c5dff63d951f99f8abe105dc59ac133
|
|
4
|
+
data.tar.gz: 6f322d2a78fa09db1ba0ec4ff099e961e734432d0fdd8347407a055aaeb259b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e5921965b88db1b2d2c28324483c974c521d46625b20af88ee9cd911d50e568dd4a9468f2eec448986e011088f3611216acaead53e16441dd932dbeeff339427
|
|
7
|
+
data.tar.gz: 4273b98e64b42f0afc3c3a10e3f70a603553649607bf3956b90d5f1e4e0497cbb98a82d7ce94fbe2d1fa3f0913c7e7bae0ee02c5b7709418052f7a5d6dbaa9e5
|
data/config/cookstyle.yml
CHANGED
|
@@ -2206,10 +2206,6 @@ Style/WordArray:
|
|
|
2206
2206
|
Enabled: true
|
|
2207
2207
|
Style/ZeroLengthPredicate:
|
|
2208
2208
|
Enabled: true
|
|
2209
|
-
Metrics/BlockNesting:
|
|
2210
|
-
Enabled: true
|
|
2211
|
-
Metrics/ParameterLists:
|
|
2212
|
-
Enabled: true
|
|
2213
2209
|
Lint/AmbiguousOperator:
|
|
2214
2210
|
Enabled: true
|
|
2215
2211
|
Lint/AssignmentInCondition:
|
|
@@ -2341,16 +2337,16 @@ Metrics/CyclomaticComplexity:
|
|
|
2341
2337
|
Enabled: false
|
|
2342
2338
|
Metrics/PerceivedComplexity:
|
|
2343
2339
|
Enabled: false
|
|
2344
|
-
|
|
2345
|
-
|
|
2340
|
+
Metrics/BlockNesting:
|
|
2341
|
+
Enabled: false
|
|
2342
|
+
Metrics/ParameterLists:
|
|
2343
|
+
Enabled: false
|
|
2346
2344
|
|
|
2347
2345
|
# This updates how we send helpers into the Chef recipe/resource classes and makes WAY more sense
|
|
2348
2346
|
# Chef::Recipe.send(:include, ::Apt::Helpers) -> Chef::Recipe.include ::Apt::Helpers
|
|
2349
2347
|
Lint/SendWithMixinArgument:
|
|
2350
2348
|
Enabled: true
|
|
2351
2349
|
|
|
2352
|
-
#### END COPS FOR THE NEXT MAJOR RELEASE
|
|
2353
|
-
|
|
2354
2350
|
# this migrates old # rubocop: comments to use the latest namespaces, which prevents a ton of spam during cookstyle runs
|
|
2355
2351
|
Migration/DepartmentName:
|
|
2356
2352
|
Enabled: true
|
|
@@ -2575,3 +2571,44 @@ Style/HashEachMethods:
|
|
|
2575
2571
|
# We want to catch this deprecation in cookbooks
|
|
2576
2572
|
Lint/DeprecatedOpenSSLConstant:
|
|
2577
2573
|
Enabled: true
|
|
2574
|
+
|
|
2575
|
+
# This just isn't a big deal in the context of a cookbook
|
|
2576
|
+
Naming/AccessorMethodName:
|
|
2577
|
+
Enabled: false
|
|
2578
|
+
|
|
2579
|
+
# Rescuing a particular exception twice isn't going to work
|
|
2580
|
+
Lint/DuplicateRescueException:
|
|
2581
|
+
Enabled: true
|
|
2582
|
+
|
|
2583
|
+
# if b == 0 && b == 0 is invalid and we should flag it
|
|
2584
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
|
2585
|
+
Enabled: true
|
|
2586
|
+
|
|
2587
|
+
# returning at the top level with an arg is invalid
|
|
2588
|
+
# @TODO we can enable this once this is fixed: https://github.com/rubocop-hq/rubocop/issues/8462
|
|
2589
|
+
# Lint/TopLevelReturnWithArgument:
|
|
2590
|
+
# Enabled: true
|
|
2591
|
+
|
|
2592
|
+
# simplify hash acccess that doesn't actually need .dig
|
|
2593
|
+
Style/SingleArgumentDig:
|
|
2594
|
+
Enabled: true
|
|
2595
|
+
|
|
2596
|
+
# trying to access $2 when there is no $2 will always return nil
|
|
2597
|
+
Lint/OutOfRangeRegexpRef:
|
|
2598
|
+
Enabled: true
|
|
2599
|
+
|
|
2600
|
+
# simplify how people coerce arrays
|
|
2601
|
+
Style/ArrayCoercion:
|
|
2602
|
+
Enabled: true
|
|
2603
|
+
|
|
2604
|
+
# if your elseif is the same as your if you're gonna have a bad day
|
|
2605
|
+
Lint/DuplicateElsifCondition:
|
|
2606
|
+
Enabled: true
|
|
2607
|
+
|
|
2608
|
+
# simplify attr_reader and attr_write into attr_accessor
|
|
2609
|
+
Style/BisectedAttrAccessor:
|
|
2610
|
+
Enabled: true
|
|
2611
|
+
|
|
2612
|
+
# avoid assignments that aren't needed
|
|
2613
|
+
Style/RedundantAssignment:
|
|
2614
|
+
Enabled: true
|
data/config/disable_all.yml
CHANGED
|
@@ -207,6 +207,8 @@ Lint/AssignmentInCondition:
|
|
|
207
207
|
Enabled: false
|
|
208
208
|
Lint/BigDecimalNew:
|
|
209
209
|
Enabled: false
|
|
210
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
|
211
|
+
Enabled: false
|
|
210
212
|
Lint/BooleanSymbol:
|
|
211
213
|
Enabled: false
|
|
212
214
|
Lint/CircularArgumentReference:
|
|
@@ -229,10 +231,14 @@ Lint/DuplicateHashKey:
|
|
|
229
231
|
Enabled: false
|
|
230
232
|
Lint/DuplicateMethods:
|
|
231
233
|
Enabled: false
|
|
234
|
+
Lint/DuplicateRescueException:
|
|
235
|
+
Enabled: false
|
|
232
236
|
Lint/EachWithObjectArgument:
|
|
233
237
|
Enabled: false
|
|
234
238
|
Lint/ElseLayout:
|
|
235
239
|
Enabled: false
|
|
240
|
+
Lint/EmptyConditionalBody:
|
|
241
|
+
Enabled: false
|
|
236
242
|
Lint/EmptyEnsure:
|
|
237
243
|
Enabled: false
|
|
238
244
|
Lint/EmptyExpression:
|
|
@@ -247,6 +253,8 @@ Lint/ErbNewArguments:
|
|
|
247
253
|
Enabled: false
|
|
248
254
|
Lint/FlipFlop:
|
|
249
255
|
Enabled: false
|
|
256
|
+
Lint/FloatComparison:
|
|
257
|
+
Enabled: false
|
|
250
258
|
Lint/FloatOutOfRange:
|
|
251
259
|
Enabled: false
|
|
252
260
|
Lint/FormatParameterMismatch:
|
|
@@ -269,6 +277,8 @@ Lint/Loop:
|
|
|
269
277
|
Enabled: false
|
|
270
278
|
Lint/MissingCopEnableDirective:
|
|
271
279
|
Enabled: false
|
|
280
|
+
Lint/MissingSuper:
|
|
281
|
+
Enabled: false
|
|
272
282
|
Lint/MixedRegexpCaptureTypes:
|
|
273
283
|
Enabled: false
|
|
274
284
|
Lint/MultipleComparison:
|
|
@@ -287,6 +297,8 @@ Lint/NumberConversion:
|
|
|
287
297
|
Enabled: false
|
|
288
298
|
Lint/OrderedMagicComments:
|
|
289
299
|
Enabled: false
|
|
300
|
+
Lint/OutOfRangeRegexpRef:
|
|
301
|
+
Enabled: false
|
|
290
302
|
Lint/ParenthesesAsGroupedExpression:
|
|
291
303
|
Enabled: false
|
|
292
304
|
Lint/PercentStringArray:
|
|
@@ -329,6 +341,8 @@ Lint/SafeNavigationWithEmpty:
|
|
|
329
341
|
Enabled: false
|
|
330
342
|
Lint/ScriptPermission:
|
|
331
343
|
Enabled: false
|
|
344
|
+
Lint/SelfAssignment:
|
|
345
|
+
Enabled: false
|
|
332
346
|
Lint/SendWithMixinArgument:
|
|
333
347
|
Enabled: false
|
|
334
348
|
Lint/ShadowedArgument:
|
|
@@ -345,12 +359,16 @@ Lint/Syntax:
|
|
|
345
359
|
Enabled: false
|
|
346
360
|
Lint/ToJSON:
|
|
347
361
|
Enabled: false
|
|
362
|
+
Lint/TopLevelReturnWithArgument:
|
|
363
|
+
Enabled: false
|
|
348
364
|
Lint/UnderscorePrefixedVariableName:
|
|
349
365
|
Enabled: false
|
|
350
366
|
Lint/UnifiedInteger:
|
|
351
367
|
Enabled: false
|
|
352
368
|
Lint/UnreachableCode:
|
|
353
369
|
Enabled: false
|
|
370
|
+
Lint/UnreachableLoop:
|
|
371
|
+
Enabled: false
|
|
354
372
|
Lint/UnusedBlockArgument:
|
|
355
373
|
Enabled: false
|
|
356
374
|
Lint/UnusedMethodArgument:
|
|
@@ -363,8 +381,6 @@ Lint/UselessAccessModifier:
|
|
|
363
381
|
Enabled: false
|
|
364
382
|
Lint/UselessAssignment:
|
|
365
383
|
Enabled: false
|
|
366
|
-
Lint/UselessComparison:
|
|
367
|
-
Enabled: false
|
|
368
384
|
Lint/UselessElseWithoutRescue:
|
|
369
385
|
Enabled: false
|
|
370
386
|
Lint/UselessSetterCall:
|
|
@@ -523,6 +539,8 @@ Style/EvenOdd:
|
|
|
523
539
|
Enabled: false
|
|
524
540
|
Style/ExpandPathArguments:
|
|
525
541
|
Enabled: false
|
|
542
|
+
Style/ExplicitBlockArgument:
|
|
543
|
+
Enabled: false
|
|
526
544
|
Style/ExponentialNotation:
|
|
527
545
|
Enabled: false
|
|
528
546
|
Style/FloatDivision:
|
|
@@ -535,6 +553,8 @@ Style/FormatStringToken:
|
|
|
535
553
|
Enabled: false
|
|
536
554
|
Style/FrozenStringLiteralComment:
|
|
537
555
|
Enabled: false
|
|
556
|
+
Style/GlobalStdStream:
|
|
557
|
+
Enabled: false
|
|
538
558
|
Style/GlobalVars:
|
|
539
559
|
Enabled: false
|
|
540
560
|
Style/GuardClause:
|
|
@@ -591,8 +611,6 @@ Style/MethodCalledOnDoEndBlock:
|
|
|
591
611
|
Enabled: false
|
|
592
612
|
Style/MethodDefParentheses:
|
|
593
613
|
Enabled: false
|
|
594
|
-
Style/MethodMissingSuper:
|
|
595
|
-
Enabled: false
|
|
596
614
|
Style/MinMax:
|
|
597
615
|
Enabled: false
|
|
598
616
|
Style/MissingElse:
|
|
@@ -657,6 +675,8 @@ Style/OptionHash:
|
|
|
657
675
|
Enabled: false
|
|
658
676
|
Style/OptionalArguments:
|
|
659
677
|
Enabled: false
|
|
678
|
+
Style/OptionalBooleanParameter:
|
|
679
|
+
Enabled: false
|
|
660
680
|
Style/ParallelAssignment:
|
|
661
681
|
Enabled: false
|
|
662
682
|
Style/ParenthesesAroundCondition:
|
|
@@ -725,6 +745,8 @@ Style/Send:
|
|
|
725
745
|
Enabled: false
|
|
726
746
|
Style/SignalException:
|
|
727
747
|
Enabled: false
|
|
748
|
+
Style/SingleArgumentDig:
|
|
749
|
+
Enabled: false
|
|
728
750
|
Style/SingleLineBlockParams:
|
|
729
751
|
Enabled: false
|
|
730
752
|
Style/SingleLineMethods:
|
|
@@ -737,6 +759,8 @@ Style/StabbyLambdaParentheses:
|
|
|
737
759
|
Enabled: false
|
|
738
760
|
Style/StderrPuts:
|
|
739
761
|
Enabled: false
|
|
762
|
+
Style/StringConcatenation:
|
|
763
|
+
Enabled: false
|
|
740
764
|
Style/StringHashKeys:
|
|
741
765
|
Enabled: false
|
|
742
766
|
Style/StringLiterals:
|
data/config/upstream.yml
CHANGED
|
@@ -210,9 +210,10 @@ Gemspec/OrderedDependencies:
|
|
|
210
210
|
- '**/*.gemspec'
|
|
211
211
|
|
|
212
212
|
Gemspec/RequiredRubyVersion:
|
|
213
|
-
Description: 'Checks that `required_ruby_version` of gemspec and `TargetRubyVersion` of .rubocop.yml
|
|
213
|
+
Description: 'Checks that `required_ruby_version` of gemspec is specified and equal to `TargetRubyVersion` of .rubocop.yml.'
|
|
214
214
|
Enabled: true
|
|
215
215
|
VersionAdded: '0.52'
|
|
216
|
+
VersionChanged: '0.89'
|
|
216
217
|
Include:
|
|
217
218
|
- '**/*.gemspec'
|
|
218
219
|
|
|
@@ -1234,7 +1235,7 @@ Layout/SpaceInsideBlockBraces:
|
|
|
1234
1235
|
|
|
1235
1236
|
Layout/SpaceInsideHashLiteralBraces:
|
|
1236
1237
|
Description: "Use spaces inside hash literal braces - or don't."
|
|
1237
|
-
StyleGuide: '#spaces-
|
|
1238
|
+
StyleGuide: '#spaces-braces'
|
|
1238
1239
|
Enabled: true
|
|
1239
1240
|
VersionAdded: '0.49'
|
|
1240
1241
|
EnforcedStyle: space
|
|
@@ -1355,6 +1356,12 @@ Lint/BigDecimalNew:
|
|
|
1355
1356
|
Enabled: true
|
|
1356
1357
|
VersionAdded: '0.53'
|
|
1357
1358
|
|
|
1359
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
|
1360
|
+
Description: 'This cop checks for places where binary operator has identical operands.'
|
|
1361
|
+
Enabled: pending
|
|
1362
|
+
Safe: false
|
|
1363
|
+
VersionAdded: '0.89'
|
|
1364
|
+
|
|
1358
1365
|
Lint/BooleanSymbol:
|
|
1359
1366
|
Description: 'Check for `:true` and `:false` symbols.'
|
|
1360
1367
|
Enabled: true
|
|
@@ -1420,6 +1427,11 @@ Lint/DuplicateMethods:
|
|
|
1420
1427
|
Enabled: true
|
|
1421
1428
|
VersionAdded: '0.29'
|
|
1422
1429
|
|
|
1430
|
+
Lint/DuplicateRescueException:
|
|
1431
|
+
Description: 'Checks that there are no repeated exceptions used in `rescue` expressions.'
|
|
1432
|
+
Enabled: pending
|
|
1433
|
+
VersionAdded: '0.89'
|
|
1434
|
+
|
|
1423
1435
|
Lint/EachWithObjectArgument:
|
|
1424
1436
|
Description: 'Check for immutable argument given to each_with_object.'
|
|
1425
1437
|
Enabled: true
|
|
@@ -1430,6 +1442,12 @@ Lint/ElseLayout:
|
|
|
1430
1442
|
Enabled: true
|
|
1431
1443
|
VersionAdded: '0.17'
|
|
1432
1444
|
|
|
1445
|
+
Lint/EmptyConditionalBody:
|
|
1446
|
+
Description: 'This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.'
|
|
1447
|
+
Enabled: 'pending'
|
|
1448
|
+
AllowComments: true
|
|
1449
|
+
VersionAdded: '0.89'
|
|
1450
|
+
|
|
1433
1451
|
Lint/EmptyEnsure:
|
|
1434
1452
|
Description: 'Checks for empty ensure block.'
|
|
1435
1453
|
Enabled: true
|
|
@@ -1473,6 +1491,12 @@ Lint/FlipFlop:
|
|
|
1473
1491
|
Enabled: true
|
|
1474
1492
|
VersionAdded: '0.16'
|
|
1475
1493
|
|
|
1494
|
+
Lint/FloatComparison:
|
|
1495
|
+
Description: 'Checks for the presence of precise comparison of floating point numbers.'
|
|
1496
|
+
StyleGuide: '#float-comparison'
|
|
1497
|
+
Enabled: pending
|
|
1498
|
+
VersionAdded: '0.89'
|
|
1499
|
+
|
|
1476
1500
|
Lint/FloatOutOfRange:
|
|
1477
1501
|
Description: >-
|
|
1478
1502
|
Catches floating-point literals too large or small for Ruby to
|
|
@@ -1520,7 +1544,7 @@ Lint/InheritException:
|
|
|
1520
1544
|
Lint/InterpolationCheck:
|
|
1521
1545
|
Description: 'Raise warning for interpolation in single q strs.'
|
|
1522
1546
|
Enabled: true
|
|
1523
|
-
|
|
1547
|
+
Safe: false
|
|
1524
1548
|
VersionAdded: '0.50'
|
|
1525
1549
|
VersionChanged: '0.87'
|
|
1526
1550
|
|
|
@@ -1542,6 +1566,7 @@ Lint/Loop:
|
|
|
1542
1566
|
StyleGuide: '#loop-with-break'
|
|
1543
1567
|
Enabled: true
|
|
1544
1568
|
VersionAdded: '0.9'
|
|
1569
|
+
VersionChanged: '0.89'
|
|
1545
1570
|
|
|
1546
1571
|
Lint/MissingCopEnableDirective:
|
|
1547
1572
|
Description: 'Checks for a `# rubocop:enable` after `# rubocop:disable`.'
|
|
@@ -1556,6 +1581,13 @@ Lint/MissingCopEnableDirective:
|
|
|
1556
1581
|
# .inf for any size
|
|
1557
1582
|
MaximumRangeSize: .inf
|
|
1558
1583
|
|
|
1584
|
+
Lint/MissingSuper:
|
|
1585
|
+
Description: >-
|
|
1586
|
+
This cop checks for the presence of constructors and lifecycle callbacks
|
|
1587
|
+
without calls to `super`'.
|
|
1588
|
+
Enabled: pending
|
|
1589
|
+
VersionAdded: '0.89'
|
|
1590
|
+
|
|
1559
1591
|
Lint/MixedRegexpCaptureTypes:
|
|
1560
1592
|
Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
|
|
1561
1593
|
Enabled: pending
|
|
@@ -1608,6 +1640,12 @@ Lint/OrderedMagicComments:
|
|
|
1608
1640
|
Enabled: true
|
|
1609
1641
|
VersionAdded: '0.53'
|
|
1610
1642
|
|
|
1643
|
+
Lint/OutOfRangeRegexpRef:
|
|
1644
|
+
Description: 'Checks for out of range reference for Regexp because it always returns nil.'
|
|
1645
|
+
Enabled: pending
|
|
1646
|
+
Safe: false
|
|
1647
|
+
VersionAdded: '0.89'
|
|
1648
|
+
|
|
1611
1649
|
Lint/ParenthesesAsGroupedExpression:
|
|
1612
1650
|
Description: >-
|
|
1613
1651
|
Checks for method calls with a space before the opening
|
|
@@ -1758,6 +1796,11 @@ Lint/ScriptPermission:
|
|
|
1758
1796
|
VersionAdded: '0.49'
|
|
1759
1797
|
VersionChanged: '0.50'
|
|
1760
1798
|
|
|
1799
|
+
Lint/SelfAssignment:
|
|
1800
|
+
Description: 'Checks for self-assignments.'
|
|
1801
|
+
Enabled: pending
|
|
1802
|
+
VersionAdded: '0.89'
|
|
1803
|
+
|
|
1761
1804
|
Lint/SendWithMixinArgument:
|
|
1762
1805
|
Description: 'Checks for `send` method when using mixin.'
|
|
1763
1806
|
Enabled: true
|
|
@@ -1808,6 +1851,11 @@ Lint/ToJSON:
|
|
|
1808
1851
|
Enabled: true
|
|
1809
1852
|
VersionAdded: '0.66'
|
|
1810
1853
|
|
|
1854
|
+
Lint/TopLevelReturnWithArgument:
|
|
1855
|
+
Description: 'This cop detects top level return statements with argument.'
|
|
1856
|
+
Enabled: 'pending'
|
|
1857
|
+
VersionAdded: '0.89'
|
|
1858
|
+
|
|
1811
1859
|
Lint/UnderscorePrefixedVariableName:
|
|
1812
1860
|
Description: 'Do not use prefix `_` for a variable that is used.'
|
|
1813
1861
|
Enabled: true
|
|
@@ -1824,6 +1872,11 @@ Lint/UnreachableCode:
|
|
|
1824
1872
|
Enabled: true
|
|
1825
1873
|
VersionAdded: '0.9'
|
|
1826
1874
|
|
|
1875
|
+
Lint/UnreachableLoop:
|
|
1876
|
+
Description: 'This cop checks for loops that will have at most one iteration.'
|
|
1877
|
+
Enabled: pending
|
|
1878
|
+
VersionAdded: '0.89'
|
|
1879
|
+
|
|
1827
1880
|
Lint/UnusedBlockArgument:
|
|
1828
1881
|
Description: 'Checks for unused block arguments.'
|
|
1829
1882
|
StyleGuide: '#underscore-unused-vars'
|
|
@@ -1873,11 +1926,6 @@ Lint/UselessAssignment:
|
|
|
1873
1926
|
Enabled: true
|
|
1874
1927
|
VersionAdded: '0.11'
|
|
1875
1928
|
|
|
1876
|
-
Lint/UselessComparison:
|
|
1877
|
-
Description: 'Checks for comparison of something with itself.'
|
|
1878
|
-
Enabled: true
|
|
1879
|
-
VersionAdded: '0.11'
|
|
1880
|
-
|
|
1881
1929
|
Lint/UselessElseWithoutRescue:
|
|
1882
1930
|
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
|
1883
1931
|
Enabled: true
|
|
@@ -1911,7 +1959,7 @@ Metrics/AbcSize:
|
|
|
1911
1959
|
# The ABC size is a calculated magnitude, so this number can be an Integer or
|
|
1912
1960
|
# a Float.
|
|
1913
1961
|
IgnoredMethods: []
|
|
1914
|
-
Max:
|
|
1962
|
+
Max: 17
|
|
1915
1963
|
|
|
1916
1964
|
Metrics/BlockLength:
|
|
1917
1965
|
Description: 'Avoid long blocks with many lines.'
|
|
@@ -1993,7 +2041,7 @@ Metrics/PerceivedComplexity:
|
|
|
1993
2041
|
VersionAdded: '0.25'
|
|
1994
2042
|
VersionChanged: '0.81'
|
|
1995
2043
|
IgnoredMethods: []
|
|
1996
|
-
Max:
|
|
2044
|
+
Max: 8
|
|
1997
2045
|
|
|
1998
2046
|
################## Migration #############################
|
|
1999
2047
|
|
|
@@ -2352,6 +2400,7 @@ Style/ArrayCoercion:
|
|
|
2352
2400
|
Use Array() instead of explicit Array check or [*var], when dealing
|
|
2353
2401
|
with a variable you want to treat as an Array, but you're not certain it's an array.
|
|
2354
2402
|
StyleGuide: '#array-coercion'
|
|
2403
|
+
Safe: false
|
|
2355
2404
|
Enabled: 'pending'
|
|
2356
2405
|
VersionAdded: '0.88'
|
|
2357
2406
|
|
|
@@ -2527,6 +2576,7 @@ Style/CaseEquality:
|
|
|
2527
2576
|
StyleGuide: '#no-case-equality'
|
|
2528
2577
|
Enabled: true
|
|
2529
2578
|
VersionAdded: '0.9'
|
|
2579
|
+
VersionChanged: '0.89'
|
|
2530
2580
|
# If AllowOnConstant is enabled, the cop will ignore violations when the receiver of
|
|
2531
2581
|
# the case equality operator is a constant.
|
|
2532
2582
|
#
|
|
@@ -2880,6 +2930,16 @@ Style/ExpandPathArguments:
|
|
|
2880
2930
|
Enabled: true
|
|
2881
2931
|
VersionAdded: '0.53'
|
|
2882
2932
|
|
|
2933
|
+
Style/ExplicitBlockArgument:
|
|
2934
|
+
Description: >-
|
|
2935
|
+
Consider using explicit block argument to avoid writing block literal
|
|
2936
|
+
that just passes its arguments to another block.
|
|
2937
|
+
StyleGuide: '#block-argument'
|
|
2938
|
+
Enabled: pending
|
|
2939
|
+
# May change the yielding arity.
|
|
2940
|
+
Safe: false
|
|
2941
|
+
VersionAdded: '0.89'
|
|
2942
|
+
|
|
2883
2943
|
Style/ExponentialNotation:
|
|
2884
2944
|
Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
|
|
2885
2945
|
StyleGuide: '#exponential-notation'
|
|
@@ -2963,6 +3023,12 @@ Style/FrozenStringLiteralComment:
|
|
|
2963
3023
|
- never
|
|
2964
3024
|
Safe: false
|
|
2965
3025
|
|
|
3026
|
+
Style/GlobalStdStream:
|
|
3027
|
+
Description: 'Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.'
|
|
3028
|
+
StyleGuide: '#global-stdout'
|
|
3029
|
+
Enabled: pending
|
|
3030
|
+
VersionAdded: '0.89'
|
|
3031
|
+
|
|
2966
3032
|
Style/GlobalVars:
|
|
2967
3033
|
Description: 'Do not introduce global variables.'
|
|
2968
3034
|
StyleGuide: '#instance-vars'
|
|
@@ -3218,12 +3284,6 @@ Style/MethodDefParentheses:
|
|
|
3218
3284
|
- require_no_parentheses
|
|
3219
3285
|
- require_no_parentheses_except_multiline
|
|
3220
3286
|
|
|
3221
|
-
Style/MethodMissingSuper:
|
|
3222
|
-
Description: Checks for `method_missing` to call `super`.
|
|
3223
|
-
StyleGuide: '#no-method-missing'
|
|
3224
|
-
Enabled: true
|
|
3225
|
-
VersionAdded: '0.56'
|
|
3226
|
-
|
|
3227
3287
|
Style/MinMax:
|
|
3228
3288
|
Description: >-
|
|
3229
3289
|
Use `Enumerable#minmax` instead of `Enumerable#min`
|
|
@@ -3565,6 +3625,13 @@ Style/OptionalArguments:
|
|
|
3565
3625
|
VersionAdded: '0.33'
|
|
3566
3626
|
VersionChanged: '0.83'
|
|
3567
3627
|
|
|
3628
|
+
Style/OptionalBooleanParameter:
|
|
3629
|
+
Description: 'Use keyword arguments when defining method with boolean argument.'
|
|
3630
|
+
StyleGuide: '#boolean-keyword-arguments'
|
|
3631
|
+
Enabled: pending
|
|
3632
|
+
Safe: false
|
|
3633
|
+
VersionAdded: '0.89'
|
|
3634
|
+
|
|
3568
3635
|
Style/OrAssignment:
|
|
3569
3636
|
Description: 'Recommend usage of double pipe equals (||=) where applicable.'
|
|
3570
3637
|
StyleGuide: '#double-pipe-for-uninit'
|
|
@@ -3883,6 +3950,12 @@ Style/SignalException:
|
|
|
3883
3950
|
- only_fail
|
|
3884
3951
|
- semantic
|
|
3885
3952
|
|
|
3953
|
+
Style/SingleArgumentDig:
|
|
3954
|
+
Description: 'Avoid using single argument dig method.'
|
|
3955
|
+
Enabled: pending
|
|
3956
|
+
VersionAdded: '0.89'
|
|
3957
|
+
Safe: false
|
|
3958
|
+
|
|
3886
3959
|
Style/SingleLineBlockParams:
|
|
3887
3960
|
Description: 'Enforces the names of some block params.'
|
|
3888
3961
|
Enabled: false
|
|
@@ -3938,6 +4011,13 @@ Style/StderrPuts:
|
|
|
3938
4011
|
Enabled: true
|
|
3939
4012
|
VersionAdded: '0.51'
|
|
3940
4013
|
|
|
4014
|
+
Style/StringConcatenation:
|
|
4015
|
+
Description: 'Checks for places where string concatenation can be replaced with string interpolation.'
|
|
4016
|
+
StyleGuide: '#string-interpolation'
|
|
4017
|
+
Enabled: pending
|
|
4018
|
+
Safe: false
|
|
4019
|
+
VersionAdded: '0.89'
|
|
4020
|
+
|
|
3941
4021
|
Style/StringHashKeys:
|
|
3942
4022
|
Description: 'Prefer symbols instead of strings as hash keys.'
|
|
3943
4023
|
StyleGuide: '#symbols-as-keys'
|
data/cookstyle.gemspec
CHANGED
|
@@ -11,6 +11,7 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
spec.email = ['thom@chef.io', 'tsmith@chef.io']
|
|
12
12
|
spec.summary = 'Cookstyle is a code linting tool that helps you to write better Chef Infra cookbooks by detecting and automatically correcting style, syntax, and logic mistakes in your code.'
|
|
13
13
|
spec.license = 'Apache-2.0'
|
|
14
|
+
spec.homepage = 'https://docs.chef.io/workstation/cookstyle/'
|
|
14
15
|
spec.required_ruby_version = '>= 2.4'
|
|
15
16
|
|
|
16
17
|
# the gemspec and Gemfile are necessary for appbundling of the gem
|
data/lib/cookstyle/version.rb
CHANGED
|
@@ -35,6 +35,8 @@ module RuboCop
|
|
|
35
35
|
#
|
|
36
36
|
class PoiseArchiveUsage < Cop
|
|
37
37
|
include RuboCop::Chef::CookbookHelpers
|
|
38
|
+
extend TargetChefVersion
|
|
39
|
+
minimum_target_chef_version '15.0'
|
|
38
40
|
|
|
39
41
|
MSG = 'The poise_archive resource in the deprecated poise-archive should be replaced with the archive_file resource found in Chef Infra Client 15+'
|
|
40
42
|
|
|
@@ -41,7 +41,7 @@ module RuboCop
|
|
|
41
41
|
|
|
42
42
|
# determine the cookbook name either by parsing metadata.rb or by parsing metadata.json
|
|
43
43
|
#
|
|
44
|
-
# @
|
|
44
|
+
# @return [String] the cookbook name
|
|
45
45
|
def cookbook_name
|
|
46
46
|
cb_path = File.expand_path(File.join(processed_source.file_path, '../..'))
|
|
47
47
|
|
|
@@ -55,7 +55,7 @@ module RuboCop
|
|
|
55
55
|
|
|
56
56
|
# given a resource name make sure there's a provides that matches that name
|
|
57
57
|
#
|
|
58
|
-
# @
|
|
58
|
+
# @return [TrueClass, FalseClass]
|
|
59
59
|
def valid_provides?(resource_name)
|
|
60
60
|
provides_ast = provides(processed_source.ast)
|
|
61
61
|
return false unless provides_ast
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cookstyle
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.
|
|
4
|
+
version: 6.15.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thom May
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2020-
|
|
12
|
+
date: 2020-08-10 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rubocop
|
|
@@ -17,14 +17,14 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - '='
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: 0.
|
|
20
|
+
version: 0.89.1
|
|
21
21
|
type: :runtime
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - '='
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: 0.
|
|
27
|
+
version: 0.89.1
|
|
28
28
|
description:
|
|
29
29
|
email:
|
|
30
30
|
- thom@chef.io
|
|
@@ -265,7 +265,7 @@ files:
|
|
|
265
265
|
- lib/rubocop/monkey_patches/config.rb
|
|
266
266
|
- lib/rubocop/monkey_patches/registry_cop.rb
|
|
267
267
|
- lib/rubocop/monkey_patches/team.rb
|
|
268
|
-
homepage:
|
|
268
|
+
homepage: https://docs.chef.io/workstation/cookstyle/
|
|
269
269
|
licenses:
|
|
270
270
|
- Apache-2.0
|
|
271
271
|
metadata:
|