chefstyle 1.1.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/chefstyle +1 -2
- data/chefstyle.gemspec +1 -1
- data/config/chefstyle.yml +5 -5
- data/config/disable_all.yml +50 -4
- data/config/upstream.yml +227 -26
- data/lib/chefstyle.rb +1 -0
- data/lib/chefstyle/version.rb +3 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8a5a9a139fa8c13a7ed8661a647267905503b17e62362412af969e40d0df91b
|
4
|
+
data.tar.gz: 51ed4bc5b0918b590a16dc9892623385610c5033db3bc1aca87cbe1da30c5c1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9cbd2f2fe158de67c16ec5932f449fc9e42877ddffe9e4e7f29881c05a645188f197241a930ddd4b51ffd2a75c38a726032a4e98fb22d922f8a755633a294d3
|
7
|
+
data.tar.gz: c439d8ae28a519fdd8190a13546db53f820ea46c8bcbd56eb8f676cf6b5f04b485d09a4da9ff52de1f46144aa00a6d0fda2cf60d377300f003a1a079a434d548
|
data/bin/chefstyle
CHANGED
data/chefstyle.gemspec
CHANGED
data/config/chefstyle.yml
CHANGED
@@ -482,11 +482,15 @@ Style/WhileUntilModifier:
|
|
482
482
|
Style/WordArray:
|
483
483
|
Enabled: true
|
484
484
|
|
485
|
+
# we are ruby > 2.0 only so we can remove encoding comments for utf-8
|
486
|
+
Style/Encoding:
|
487
|
+
Enabled: true
|
488
|
+
|
485
489
|
#
|
486
490
|
# Disabled Style
|
487
491
|
#
|
488
492
|
|
489
|
-
#
|
493
|
+
# reduces memory usage, but isn't a simple autocorrect so we need to do this one project at a time
|
490
494
|
Style/FrozenStringLiteralComment:
|
491
495
|
Enabled: false
|
492
496
|
|
@@ -529,10 +533,6 @@ Style/FormatString:
|
|
529
533
|
Style/IfUnlessModifier:
|
530
534
|
Enabled: false
|
531
535
|
|
532
|
-
# we are ruby > 2.0 only so can disable the Encoding cop
|
533
|
-
Style/Encoding:
|
534
|
-
Enabled: false
|
535
|
-
|
536
536
|
# Dan is -1 on this one: https://github.com/chef/chef/pull/4526#issuecomment-179950045
|
537
537
|
Layout/IndentFirstHashElement:
|
538
538
|
Enabled: false
|
data/config/disable_all.yml
CHANGED
@@ -207,10 +207,14 @@ 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:
|
213
215
|
Enabled: false
|
216
|
+
Lint/ConstantResolution:
|
217
|
+
Enabled: false
|
214
218
|
Lint/Debugger:
|
215
219
|
Enabled: false
|
216
220
|
Lint/DeprecatedClassMethods:
|
@@ -221,14 +225,20 @@ Lint/DisjunctiveAssignmentInConstructor:
|
|
221
225
|
Enabled: false
|
222
226
|
Lint/DuplicateCaseCondition:
|
223
227
|
Enabled: false
|
228
|
+
Lint/DuplicateElsifCondition:
|
229
|
+
Enabled: false
|
224
230
|
Lint/DuplicateHashKey:
|
225
231
|
Enabled: false
|
226
232
|
Lint/DuplicateMethods:
|
227
233
|
Enabled: false
|
234
|
+
Lint/DuplicateRescueException:
|
235
|
+
Enabled: false
|
228
236
|
Lint/EachWithObjectArgument:
|
229
237
|
Enabled: false
|
230
238
|
Lint/ElseLayout:
|
231
239
|
Enabled: false
|
240
|
+
Lint/EmptyConditionalBody:
|
241
|
+
Enabled: false
|
232
242
|
Lint/EmptyEnsure:
|
233
243
|
Enabled: false
|
234
244
|
Lint/EmptyExpression:
|
@@ -243,6 +253,8 @@ Lint/ErbNewArguments:
|
|
243
253
|
Enabled: false
|
244
254
|
Lint/FlipFlop:
|
245
255
|
Enabled: false
|
256
|
+
Lint/FloatComparison:
|
257
|
+
Enabled: false
|
246
258
|
Lint/FloatOutOfRange:
|
247
259
|
Enabled: false
|
248
260
|
Lint/FormatParameterMismatch:
|
@@ -265,6 +277,8 @@ Lint/Loop:
|
|
265
277
|
Enabled: false
|
266
278
|
Lint/MissingCopEnableDirective:
|
267
279
|
Enabled: false
|
280
|
+
Lint/MissingSuper:
|
281
|
+
Enabled: false
|
268
282
|
Lint/MixedRegexpCaptureTypes:
|
269
283
|
Enabled: false
|
270
284
|
Lint/MultipleComparison:
|
@@ -283,6 +297,8 @@ Lint/NumberConversion:
|
|
283
297
|
Enabled: false
|
284
298
|
Lint/OrderedMagicComments:
|
285
299
|
Enabled: false
|
300
|
+
Lint/OutOfRangeRegexpRef:
|
301
|
+
Enabled: false
|
286
302
|
Lint/ParenthesesAsGroupedExpression:
|
287
303
|
Enabled: false
|
288
304
|
Lint/PercentStringArray:
|
@@ -325,6 +341,8 @@ Lint/SafeNavigationWithEmpty:
|
|
325
341
|
Enabled: false
|
326
342
|
Lint/ScriptPermission:
|
327
343
|
Enabled: false
|
344
|
+
Lint/SelfAssignment:
|
345
|
+
Enabled: false
|
328
346
|
Lint/SendWithMixinArgument:
|
329
347
|
Enabled: false
|
330
348
|
Lint/ShadowedArgument:
|
@@ -341,12 +359,16 @@ Lint/Syntax:
|
|
341
359
|
Enabled: false
|
342
360
|
Lint/ToJSON:
|
343
361
|
Enabled: false
|
362
|
+
Lint/TopLevelReturnWithArgument:
|
363
|
+
Enabled: false
|
344
364
|
Lint/UnderscorePrefixedVariableName:
|
345
365
|
Enabled: false
|
346
366
|
Lint/UnifiedInteger:
|
347
367
|
Enabled: false
|
348
368
|
Lint/UnreachableCode:
|
349
369
|
Enabled: false
|
370
|
+
Lint/UnreachableLoop:
|
371
|
+
Enabled: false
|
350
372
|
Lint/UnusedBlockArgument:
|
351
373
|
Enabled: false
|
352
374
|
Lint/UnusedMethodArgument:
|
@@ -359,8 +381,6 @@ Lint/UselessAccessModifier:
|
|
359
381
|
Enabled: false
|
360
382
|
Lint/UselessAssignment:
|
361
383
|
Enabled: false
|
362
|
-
Lint/UselessComparison:
|
363
|
-
Enabled: false
|
364
384
|
Lint/UselessElseWithoutRescue:
|
365
385
|
Enabled: false
|
366
386
|
Lint/UselessSetterCall:
|
@@ -419,10 +439,14 @@ Naming/VariableNumber:
|
|
419
439
|
Enabled: false
|
420
440
|
Style/AccessModifierDeclarations:
|
421
441
|
Enabled: false
|
442
|
+
Style/AccessorGrouping:
|
443
|
+
Enabled: false
|
422
444
|
Style/Alias:
|
423
445
|
Enabled: false
|
424
446
|
Style/AndOr:
|
425
447
|
Enabled: false
|
448
|
+
Style/ArrayCoercion:
|
449
|
+
Enabled: false
|
426
450
|
Style/ArrayJoin:
|
427
451
|
Enabled: false
|
428
452
|
Style/AsciiComments:
|
@@ -435,12 +459,16 @@ Style/BarePercentLiterals:
|
|
435
459
|
Enabled: false
|
436
460
|
Style/BeginBlock:
|
437
461
|
Enabled: false
|
462
|
+
Style/BisectedAttrAccessor:
|
463
|
+
Enabled: false
|
438
464
|
Style/BlockComments:
|
439
465
|
Enabled: false
|
440
466
|
Style/BlockDelimiters:
|
441
467
|
Enabled: false
|
442
468
|
Style/CaseEquality:
|
443
469
|
Enabled: false
|
470
|
+
Style/CaseLikeIf:
|
471
|
+
Enabled: false
|
444
472
|
Style/CharacterLiteral:
|
445
473
|
Enabled: false
|
446
474
|
Style/ClassAndModuleChildren:
|
@@ -511,6 +539,8 @@ Style/EvenOdd:
|
|
511
539
|
Enabled: false
|
512
540
|
Style/ExpandPathArguments:
|
513
541
|
Enabled: false
|
542
|
+
Style/ExplicitBlockArgument:
|
543
|
+
Enabled: false
|
514
544
|
Style/ExponentialNotation:
|
515
545
|
Enabled: false
|
516
546
|
Style/FloatDivision:
|
@@ -523,12 +553,18 @@ Style/FormatStringToken:
|
|
523
553
|
Enabled: false
|
524
554
|
Style/FrozenStringLiteralComment:
|
525
555
|
Enabled: false
|
556
|
+
Style/GlobalStdStream:
|
557
|
+
Enabled: false
|
526
558
|
Style/GlobalVars:
|
527
559
|
Enabled: false
|
528
560
|
Style/GuardClause:
|
529
561
|
Enabled: false
|
562
|
+
Style/HashAsLastArrayItem:
|
563
|
+
Enabled: false
|
530
564
|
Style/HashEachMethods:
|
531
565
|
Enabled: false
|
566
|
+
Style/HashLikeCase:
|
567
|
+
Enabled: false
|
532
568
|
Style/HashSyntax:
|
533
569
|
Enabled: false
|
534
570
|
Style/HashTransformKeys:
|
@@ -565,12 +601,16 @@ Style/MethodCallWithoutArgsParentheses:
|
|
565
601
|
Enabled: false
|
566
602
|
Style/MethodCallWithArgsParentheses:
|
567
603
|
Enabled: false
|
604
|
+
Style/RedundantAssignment:
|
605
|
+
Enabled: false
|
606
|
+
Style/RedundantFetchBlock:
|
607
|
+
Enabled: false
|
608
|
+
Style/RedundantFileExtensionInRequire:
|
609
|
+
Enabled: false
|
568
610
|
Style/MethodCalledOnDoEndBlock:
|
569
611
|
Enabled: false
|
570
612
|
Style/MethodDefParentheses:
|
571
613
|
Enabled: false
|
572
|
-
Style/MethodMissingSuper:
|
573
|
-
Enabled: false
|
574
614
|
Style/MinMax:
|
575
615
|
Enabled: false
|
576
616
|
Style/MissingElse:
|
@@ -635,6 +675,8 @@ Style/OptionHash:
|
|
635
675
|
Enabled: false
|
636
676
|
Style/OptionalArguments:
|
637
677
|
Enabled: false
|
678
|
+
Style/OptionalBooleanParameter:
|
679
|
+
Enabled: false
|
638
680
|
Style/ParallelAssignment:
|
639
681
|
Enabled: false
|
640
682
|
Style/ParenthesesAroundCondition:
|
@@ -703,6 +745,8 @@ Style/Send:
|
|
703
745
|
Enabled: false
|
704
746
|
Style/SignalException:
|
705
747
|
Enabled: false
|
748
|
+
Style/SingleArgumentDig:
|
749
|
+
Enabled: false
|
706
750
|
Style/SingleLineBlockParams:
|
707
751
|
Enabled: false
|
708
752
|
Style/SingleLineMethods:
|
@@ -715,6 +759,8 @@ Style/StabbyLambdaParentheses:
|
|
715
759
|
Enabled: false
|
716
760
|
Style/StderrPuts:
|
717
761
|
Enabled: false
|
762
|
+
Style/StringConcatenation:
|
763
|
+
Enabled: false
|
718
764
|
Style/StringHashKeys:
|
719
765
|
Enabled: false
|
720
766
|
Style/StringLiterals:
|
data/config/upstream.yml
CHANGED
@@ -180,6 +180,9 @@ Bundler/OrderedGems:
|
|
180
180
|
VersionAdded: '0.46'
|
181
181
|
VersionChanged: '0.47'
|
182
182
|
TreatCommentsAsGroupSeparators: true
|
183
|
+
# By default, "-" and "_" are ignored for order purposes.
|
184
|
+
# This can be overridden by setting this parameter to true.
|
185
|
+
ConsiderPunctuation: false
|
183
186
|
Include:
|
184
187
|
- '**/*.gemfile'
|
185
188
|
- '**/Gemfile'
|
@@ -200,13 +203,17 @@ Gemspec/OrderedDependencies:
|
|
200
203
|
Enabled: true
|
201
204
|
VersionAdded: '0.51'
|
202
205
|
TreatCommentsAsGroupSeparators: true
|
206
|
+
# By default, "-" and "_" are ignored for order purposes.
|
207
|
+
# This can be overridden by setting this parameter to true.
|
208
|
+
ConsiderPunctuation: false
|
203
209
|
Include:
|
204
210
|
- '**/*.gemspec'
|
205
211
|
|
206
212
|
Gemspec/RequiredRubyVersion:
|
207
|
-
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.'
|
208
214
|
Enabled: true
|
209
215
|
VersionAdded: '0.52'
|
216
|
+
VersionChanged: '0.89'
|
210
217
|
Include:
|
211
218
|
- '**/*.gemspec'
|
212
219
|
|
@@ -1228,7 +1235,7 @@ Layout/SpaceInsideBlockBraces:
|
|
1228
1235
|
|
1229
1236
|
Layout/SpaceInsideHashLiteralBraces:
|
1230
1237
|
Description: "Use spaces inside hash literal braces - or don't."
|
1231
|
-
StyleGuide: '#spaces-
|
1238
|
+
StyleGuide: '#spaces-braces'
|
1232
1239
|
Enabled: true
|
1233
1240
|
VersionAdded: '0.49'
|
1234
1241
|
EnforcedStyle: space
|
@@ -1349,6 +1356,12 @@ Lint/BigDecimalNew:
|
|
1349
1356
|
Enabled: true
|
1350
1357
|
VersionAdded: '0.53'
|
1351
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
|
+
|
1352
1365
|
Lint/BooleanSymbol:
|
1353
1366
|
Description: 'Check for `:true` and `:false` symbols.'
|
1354
1367
|
Enabled: true
|
@@ -1361,6 +1374,15 @@ Lint/CircularArgumentReference:
|
|
1361
1374
|
Enabled: true
|
1362
1375
|
VersionAdded: '0.33'
|
1363
1376
|
|
1377
|
+
Lint/ConstantResolution:
|
1378
|
+
Description: 'Check that constants are fully qualified with `::`.'
|
1379
|
+
Enabled: false
|
1380
|
+
VersionAdded: '0.86'
|
1381
|
+
# Restrict this cop to only looking at certain names
|
1382
|
+
Only: []
|
1383
|
+
# Restrict this cop from only looking at certain names
|
1384
|
+
Ignore: []
|
1385
|
+
|
1364
1386
|
Lint/Debugger:
|
1365
1387
|
Description: 'Check for debugger calls.'
|
1366
1388
|
Enabled: true
|
@@ -1382,12 +1404,18 @@ Lint/DisjunctiveAssignmentInConstructor:
|
|
1382
1404
|
Enabled: true
|
1383
1405
|
Safe: false
|
1384
1406
|
VersionAdded: '0.62'
|
1407
|
+
VersionChanged: '0.88'
|
1385
1408
|
|
1386
1409
|
Lint/DuplicateCaseCondition:
|
1387
1410
|
Description: 'Do not repeat values in case conditionals.'
|
1388
1411
|
Enabled: true
|
1389
1412
|
VersionAdded: '0.45'
|
1390
1413
|
|
1414
|
+
Lint/DuplicateElsifCondition:
|
1415
|
+
Description: 'Do not repeat conditions used in if `elsif`.'
|
1416
|
+
Enabled: 'pending'
|
1417
|
+
VersionAdded: '0.88'
|
1418
|
+
|
1391
1419
|
Lint/DuplicateHashKey:
|
1392
1420
|
Description: 'Check for duplicate keys in hash literals.'
|
1393
1421
|
Enabled: true
|
@@ -1399,6 +1427,11 @@ Lint/DuplicateMethods:
|
|
1399
1427
|
Enabled: true
|
1400
1428
|
VersionAdded: '0.29'
|
1401
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
|
+
|
1402
1435
|
Lint/EachWithObjectArgument:
|
1403
1436
|
Description: 'Check for immutable argument given to each_with_object.'
|
1404
1437
|
Enabled: true
|
@@ -1409,6 +1442,12 @@ Lint/ElseLayout:
|
|
1409
1442
|
Enabled: true
|
1410
1443
|
VersionAdded: '0.17'
|
1411
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
|
+
|
1412
1451
|
Lint/EmptyEnsure:
|
1413
1452
|
Description: 'Checks for empty ensure block.'
|
1414
1453
|
Enabled: true
|
@@ -1452,6 +1491,12 @@ Lint/FlipFlop:
|
|
1452
1491
|
Enabled: true
|
1453
1492
|
VersionAdded: '0.16'
|
1454
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
|
+
|
1455
1500
|
Lint/FloatOutOfRange:
|
1456
1501
|
Description: >-
|
1457
1502
|
Catches floating-point literals too large or small for Ruby to
|
@@ -1499,7 +1544,9 @@ Lint/InheritException:
|
|
1499
1544
|
Lint/InterpolationCheck:
|
1500
1545
|
Description: 'Raise warning for interpolation in single q strs.'
|
1501
1546
|
Enabled: true
|
1547
|
+
Safe: false
|
1502
1548
|
VersionAdded: '0.50'
|
1549
|
+
VersionChanged: '0.87'
|
1503
1550
|
|
1504
1551
|
Lint/LiteralAsCondition:
|
1505
1552
|
Description: 'Checks of literals used in conditions.'
|
@@ -1519,6 +1566,7 @@ Lint/Loop:
|
|
1519
1566
|
StyleGuide: '#loop-with-break'
|
1520
1567
|
Enabled: true
|
1521
1568
|
VersionAdded: '0.9'
|
1569
|
+
VersionChanged: '0.89'
|
1522
1570
|
|
1523
1571
|
Lint/MissingCopEnableDirective:
|
1524
1572
|
Description: 'Checks for a `# rubocop:enable` after `# rubocop:disable`.'
|
@@ -1533,6 +1581,13 @@ Lint/MissingCopEnableDirective:
|
|
1533
1581
|
# .inf for any size
|
1534
1582
|
MaximumRangeSize: .inf
|
1535
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
|
+
|
1536
1591
|
Lint/MixedRegexpCaptureTypes:
|
1537
1592
|
Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
|
1538
1593
|
Enabled: pending
|
@@ -1585,6 +1640,12 @@ Lint/OrderedMagicComments:
|
|
1585
1640
|
Enabled: true
|
1586
1641
|
VersionAdded: '0.53'
|
1587
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
|
+
|
1588
1649
|
Lint/ParenthesesAsGroupedExpression:
|
1589
1650
|
Description: >-
|
1590
1651
|
Checks for method calls with a space before the opening
|
@@ -1611,7 +1672,9 @@ Lint/RaiseException:
|
|
1611
1672
|
Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
|
1612
1673
|
StyleGuide: '#raise-exception'
|
1613
1674
|
Enabled: pending
|
1675
|
+
Safe: false
|
1614
1676
|
VersionAdded: '0.81'
|
1677
|
+
VersionChanged: '0.86'
|
1615
1678
|
AllowedImplicitNamespaces:
|
1616
1679
|
- 'Gem'
|
1617
1680
|
|
@@ -1668,6 +1731,7 @@ Lint/RegexpAsCondition:
|
|
1668
1731
|
The regexp literal matches `$_` implicitly.
|
1669
1732
|
Enabled: true
|
1670
1733
|
VersionAdded: '0.51'
|
1734
|
+
VersionChanged: '0.86'
|
1671
1735
|
|
1672
1736
|
Lint/RequireParentheses:
|
1673
1737
|
Description: >-
|
@@ -1724,6 +1788,7 @@ Lint/SafeNavigationWithEmpty:
|
|
1724
1788
|
Description: 'Avoid `foo&.empty?` in conditionals.'
|
1725
1789
|
Enabled: true
|
1726
1790
|
VersionAdded: '0.62'
|
1791
|
+
VersionChanged: '0.87'
|
1727
1792
|
|
1728
1793
|
Lint/ScriptPermission:
|
1729
1794
|
Description: 'Grant script file execute permission.'
|
@@ -1731,6 +1796,11 @@ Lint/ScriptPermission:
|
|
1731
1796
|
VersionAdded: '0.49'
|
1732
1797
|
VersionChanged: '0.50'
|
1733
1798
|
|
1799
|
+
Lint/SelfAssignment:
|
1800
|
+
Description: 'Checks for self-assignments.'
|
1801
|
+
Enabled: pending
|
1802
|
+
VersionAdded: '0.89'
|
1803
|
+
|
1734
1804
|
Lint/SendWithMixinArgument:
|
1735
1805
|
Description: 'Checks for `send` method when using mixin.'
|
1736
1806
|
Enabled: true
|
@@ -1781,6 +1851,11 @@ Lint/ToJSON:
|
|
1781
1851
|
Enabled: true
|
1782
1852
|
VersionAdded: '0.66'
|
1783
1853
|
|
1854
|
+
Lint/TopLevelReturnWithArgument:
|
1855
|
+
Description: 'This cop detects top level return statements with argument.'
|
1856
|
+
Enabled: 'pending'
|
1857
|
+
VersionAdded: '0.89'
|
1858
|
+
|
1784
1859
|
Lint/UnderscorePrefixedVariableName:
|
1785
1860
|
Description: 'Do not use prefix `_` for a variable that is used.'
|
1786
1861
|
Enabled: true
|
@@ -1797,6 +1872,11 @@ Lint/UnreachableCode:
|
|
1797
1872
|
Enabled: true
|
1798
1873
|
VersionAdded: '0.9'
|
1799
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
|
+
|
1800
1880
|
Lint/UnusedBlockArgument:
|
1801
1881
|
Description: 'Checks for unused block arguments.'
|
1802
1882
|
StyleGuide: '#underscore-unused-vars'
|
@@ -1846,11 +1926,6 @@ Lint/UselessAssignment:
|
|
1846
1926
|
Enabled: true
|
1847
1927
|
VersionAdded: '0.11'
|
1848
1928
|
|
1849
|
-
Lint/UselessComparison:
|
1850
|
-
Description: 'Checks for comparison of something with itself.'
|
1851
|
-
Enabled: true
|
1852
|
-
VersionAdded: '0.11'
|
1853
|
-
|
1854
1929
|
Lint/UselessElseWithoutRescue:
|
1855
1930
|
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
1856
1931
|
Enabled: true
|
@@ -1884,15 +1959,16 @@ Metrics/AbcSize:
|
|
1884
1959
|
# The ABC size is a calculated magnitude, so this number can be an Integer or
|
1885
1960
|
# a Float.
|
1886
1961
|
IgnoredMethods: []
|
1887
|
-
Max:
|
1962
|
+
Max: 17
|
1888
1963
|
|
1889
1964
|
Metrics/BlockLength:
|
1890
1965
|
Description: 'Avoid long blocks with many lines.'
|
1891
1966
|
Enabled: true
|
1892
1967
|
VersionAdded: '0.44'
|
1893
|
-
VersionChanged: '0.
|
1968
|
+
VersionChanged: '0.87'
|
1894
1969
|
CountComments: false # count full line comments?
|
1895
1970
|
Max: 25
|
1971
|
+
CountAsOne: []
|
1896
1972
|
ExcludedMethods:
|
1897
1973
|
# By default, exclude the `#refine` method, as it tends to have larger
|
1898
1974
|
# associated blocks.
|
@@ -1913,8 +1989,10 @@ Metrics/ClassLength:
|
|
1913
1989
|
Description: 'Avoid classes longer than 100 lines of code.'
|
1914
1990
|
Enabled: true
|
1915
1991
|
VersionAdded: '0.25'
|
1992
|
+
VersionChanged: '0.87'
|
1916
1993
|
CountComments: false # count full line comments?
|
1917
1994
|
Max: 100
|
1995
|
+
CountAsOne: []
|
1918
1996
|
|
1919
1997
|
# Avoid complex methods.
|
1920
1998
|
Metrics/CyclomaticComplexity:
|
@@ -1925,24 +2003,27 @@ Metrics/CyclomaticComplexity:
|
|
1925
2003
|
VersionAdded: '0.25'
|
1926
2004
|
VersionChanged: '0.81'
|
1927
2005
|
IgnoredMethods: []
|
1928
|
-
Max:
|
2006
|
+
Max: 7
|
1929
2007
|
|
1930
2008
|
Metrics/MethodLength:
|
1931
2009
|
Description: 'Avoid methods longer than 10 lines of code.'
|
1932
2010
|
StyleGuide: '#short-methods'
|
1933
2011
|
Enabled: true
|
1934
2012
|
VersionAdded: '0.25'
|
1935
|
-
VersionChanged: '0.
|
2013
|
+
VersionChanged: '0.87'
|
1936
2014
|
CountComments: false # count full line comments?
|
1937
2015
|
Max: 10
|
2016
|
+
CountAsOne: []
|
1938
2017
|
ExcludedMethods: []
|
1939
2018
|
|
1940
2019
|
Metrics/ModuleLength:
|
1941
2020
|
Description: 'Avoid modules longer than 100 lines of code.'
|
1942
2021
|
Enabled: true
|
1943
2022
|
VersionAdded: '0.31'
|
2023
|
+
VersionChanged: '0.87'
|
1944
2024
|
CountComments: false # count full line comments?
|
1945
2025
|
Max: 100
|
2026
|
+
CountAsOne: []
|
1946
2027
|
|
1947
2028
|
Metrics/ParameterLists:
|
1948
2029
|
Description: 'Avoid parameter lists longer than three or four parameters.'
|
@@ -1960,7 +2041,7 @@ Metrics/PerceivedComplexity:
|
|
1960
2041
|
VersionAdded: '0.25'
|
1961
2042
|
VersionChanged: '0.81'
|
1962
2043
|
IgnoredMethods: []
|
1963
|
-
Max:
|
2044
|
+
Max: 8
|
1964
2045
|
|
1965
2046
|
################## Migration #############################
|
1966
2047
|
|
@@ -1980,10 +2061,12 @@ Naming/AccessorMethodName:
|
|
1980
2061
|
VersionAdded: '0.50'
|
1981
2062
|
|
1982
2063
|
Naming/AsciiIdentifiers:
|
1983
|
-
Description: 'Use only ascii symbols in identifiers.'
|
2064
|
+
Description: 'Use only ascii symbols in identifiers and constants.'
|
1984
2065
|
StyleGuide: '#english-identifiers'
|
1985
2066
|
Enabled: true
|
1986
2067
|
VersionAdded: '0.50'
|
2068
|
+
VersionChanged: '0.87'
|
2069
|
+
AsciiConstants: true
|
1987
2070
|
|
1988
2071
|
Naming/BinaryOperatorParameterName:
|
1989
2072
|
Description: 'When defining binary operators, name the argument other.'
|
@@ -2150,17 +2233,18 @@ Naming/MethodParameterName:
|
|
2150
2233
|
AllowNamesEndingInNumbers: true
|
2151
2234
|
# Allowed names that will not register an offense
|
2152
2235
|
AllowedNames:
|
2153
|
-
-
|
2154
|
-
- id
|
2155
|
-
- to
|
2236
|
+
- at
|
2156
2237
|
- by
|
2157
|
-
-
|
2238
|
+
- db
|
2239
|
+
- id
|
2158
2240
|
- in
|
2159
|
-
-
|
2241
|
+
- io
|
2160
2242
|
- ip
|
2161
|
-
-
|
2243
|
+
- of
|
2244
|
+
- 'on'
|
2162
2245
|
- os
|
2163
2246
|
- pp
|
2247
|
+
- to
|
2164
2248
|
# Forbidden names that will register an offense
|
2165
2249
|
ForbiddenNames: []
|
2166
2250
|
|
@@ -2276,6 +2360,17 @@ Style/AccessModifierDeclarations:
|
|
2276
2360
|
- group
|
2277
2361
|
AllowModifiersOnSymbols: true
|
2278
2362
|
|
2363
|
+
Style/AccessorGrouping:
|
2364
|
+
Description: 'Checks for grouping of accessors in `class` and `module` bodies.'
|
2365
|
+
Enabled: 'pending'
|
2366
|
+
VersionAdded: '0.87'
|
2367
|
+
EnforcedStyle: grouped
|
2368
|
+
SupportedStyles:
|
2369
|
+
# separated: each accessor goes in a separate statement.
|
2370
|
+
# grouped: accessors are grouped into a single statement.
|
2371
|
+
- separated
|
2372
|
+
- grouped
|
2373
|
+
|
2279
2374
|
Style/Alias:
|
2280
2375
|
Description: 'Use alias instead of alias_method.'
|
2281
2376
|
StyleGuide: '#alias-method-lexically'
|
@@ -2300,6 +2395,15 @@ Style/AndOr:
|
|
2300
2395
|
- always
|
2301
2396
|
- conditionals
|
2302
2397
|
|
2398
|
+
Style/ArrayCoercion:
|
2399
|
+
Description: >-
|
2400
|
+
Use Array() instead of explicit Array check or [*var], when dealing
|
2401
|
+
with a variable you want to treat as an Array, but you're not certain it's an array.
|
2402
|
+
StyleGuide: '#array-coercion'
|
2403
|
+
Safe: false
|
2404
|
+
Enabled: 'pending'
|
2405
|
+
VersionAdded: '0.88'
|
2406
|
+
|
2303
2407
|
Style/ArrayJoin:
|
2304
2408
|
Description: 'Use Array#join instead of Array#*.'
|
2305
2409
|
StyleGuide: '#array-join'
|
@@ -2343,6 +2447,13 @@ Style/BeginBlock:
|
|
2343
2447
|
Enabled: true
|
2344
2448
|
VersionAdded: '0.9'
|
2345
2449
|
|
2450
|
+
Style/BisectedAttrAccessor:
|
2451
|
+
Description: >-
|
2452
|
+
Checks for places where `attr_reader` and `attr_writer`
|
2453
|
+
for the same method can be combined into single `attr_accessor`.
|
2454
|
+
Enabled: 'pending'
|
2455
|
+
VersionAdded: '0.87'
|
2456
|
+
|
2346
2457
|
Style/BlockComments:
|
2347
2458
|
Description: 'Do not use block comments.'
|
2348
2459
|
StyleGuide: '#no-block-comments'
|
@@ -2465,6 +2576,7 @@ Style/CaseEquality:
|
|
2465
2576
|
StyleGuide: '#no-case-equality'
|
2466
2577
|
Enabled: true
|
2467
2578
|
VersionAdded: '0.9'
|
2579
|
+
VersionChanged: '0.89'
|
2468
2580
|
# If AllowOnConstant is enabled, the cop will ignore violations when the receiver of
|
2469
2581
|
# the case equality operator is a constant.
|
2470
2582
|
#
|
@@ -2475,6 +2587,12 @@ Style/CaseEquality:
|
|
2475
2587
|
# String === "string"
|
2476
2588
|
AllowOnConstant: false
|
2477
2589
|
|
2590
|
+
Style/CaseLikeIf:
|
2591
|
+
Description: 'This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.'
|
2592
|
+
StyleGuide: '#case-vs-if-else'
|
2593
|
+
Enabled: 'pending'
|
2594
|
+
VersionAdded: '0.88'
|
2595
|
+
|
2478
2596
|
Style/CharacterLiteral:
|
2479
2597
|
Description: 'Checks for uses of character literals.'
|
2480
2598
|
StyleGuide: '#no-character-literals'
|
@@ -2717,6 +2835,7 @@ Style/DoubleNegation:
|
|
2717
2835
|
VersionAdded: '0.19'
|
2718
2836
|
VersionChanged: '0.84'
|
2719
2837
|
EnforcedStyle: allowed_in_returns
|
2838
|
+
SafeAutoCorrect: false
|
2720
2839
|
SupportedStyles:
|
2721
2840
|
- allowed_in_returns
|
2722
2841
|
- forbidden
|
@@ -2811,6 +2930,16 @@ Style/ExpandPathArguments:
|
|
2811
2930
|
Enabled: true
|
2812
2931
|
VersionAdded: '0.53'
|
2813
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
|
+
|
2814
2943
|
Style/ExponentialNotation:
|
2815
2944
|
Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
|
2816
2945
|
StyleGuide: '#exponential-notation'
|
@@ -2894,6 +3023,12 @@ Style/FrozenStringLiteralComment:
|
|
2894
3023
|
- never
|
2895
3024
|
Safe: false
|
2896
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
|
+
|
2897
3032
|
Style/GlobalVars:
|
2898
3033
|
Description: 'Do not introduce global variables.'
|
2899
3034
|
StyleGuide: '#instance-vars'
|
@@ -2913,6 +3048,18 @@ Style/GuardClause:
|
|
2913
3048
|
# needs to have to trigger this cop
|
2914
3049
|
MinBodyLength: 1
|
2915
3050
|
|
3051
|
+
Style/HashAsLastArrayItem:
|
3052
|
+
Description: >-
|
3053
|
+
Checks for presence or absence of braces around hash literal as a last
|
3054
|
+
array item depending on configuration.
|
3055
|
+
StyleGuide: '#hash-literal-as-last-array-item'
|
3056
|
+
Enabled: 'pending'
|
3057
|
+
VersionAdded: '0.88'
|
3058
|
+
EnforcedStyle: braces
|
3059
|
+
SupportedStyles:
|
3060
|
+
- braces
|
3061
|
+
- no_braces
|
3062
|
+
|
2916
3063
|
Style/HashEachMethods:
|
2917
3064
|
Description: 'Use Hash#each_key and Hash#each_value.'
|
2918
3065
|
StyleGuide: '#hash-each'
|
@@ -2920,6 +3067,16 @@ Style/HashEachMethods:
|
|
2920
3067
|
VersionAdded: '0.80'
|
2921
3068
|
Safe: false
|
2922
3069
|
|
3070
|
+
Style/HashLikeCase:
|
3071
|
+
Description: >-
|
3072
|
+
Checks for places where `case-when` represents a simple 1:1
|
3073
|
+
mapping and can be replaced with a hash lookup.
|
3074
|
+
Enabled: 'pending'
|
3075
|
+
VersionAdded: '0.88'
|
3076
|
+
# `MinBranchesCount` defines the number of branches `case` needs to have
|
3077
|
+
# to trigger this cop
|
3078
|
+
MinBranchesCount: 3
|
3079
|
+
|
2923
3080
|
Style/HashSyntax:
|
2924
3081
|
Description: >-
|
2925
3082
|
Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
|
@@ -2983,6 +3140,7 @@ Style/IfUnlessModifierOfIfUnless:
|
|
2983
3140
|
Avoid modifier if/unless usage on conditionals.
|
2984
3141
|
Enabled: true
|
2985
3142
|
VersionAdded: '0.39'
|
3143
|
+
VersionChanged: '0.87'
|
2986
3144
|
|
2987
3145
|
Style/IfWithSemicolon:
|
2988
3146
|
Description: 'Do not use if x; .... Use the ternary operator instead.'
|
@@ -3126,12 +3284,6 @@ Style/MethodDefParentheses:
|
|
3126
3284
|
- require_no_parentheses
|
3127
3285
|
- require_no_parentheses_except_multiline
|
3128
3286
|
|
3129
|
-
Style/MethodMissingSuper:
|
3130
|
-
Description: Checks for `method_missing` to call `super`.
|
3131
|
-
StyleGuide: '#no-method-missing'
|
3132
|
-
Enabled: true
|
3133
|
-
VersionAdded: '0.56'
|
3134
|
-
|
3135
3287
|
Style/MinMax:
|
3136
3288
|
Description: >-
|
3137
3289
|
Use `Enumerable#minmax` instead of `Enumerable#min`
|
@@ -3239,6 +3391,7 @@ Style/MultilineTernaryOperator:
|
|
3239
3391
|
StyleGuide: '#no-multiline-ternary'
|
3240
3392
|
Enabled: true
|
3241
3393
|
VersionAdded: '0.9'
|
3394
|
+
VersionChanged: '0.86'
|
3242
3395
|
|
3243
3396
|
Style/MultilineWhenThen:
|
3244
3397
|
Description: 'Do not use then for multi-line when statement.'
|
@@ -3343,6 +3496,7 @@ Style/NestedTernaryOperator:
|
|
3343
3496
|
StyleGuide: '#no-nested-ternary'
|
3344
3497
|
Enabled: true
|
3345
3498
|
VersionAdded: '0.9'
|
3499
|
+
VersionChanged: '0.86'
|
3346
3500
|
|
3347
3501
|
Style/Next:
|
3348
3502
|
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
@@ -3471,6 +3625,13 @@ Style/OptionalArguments:
|
|
3471
3625
|
VersionAdded: '0.33'
|
3472
3626
|
VersionChanged: '0.83'
|
3473
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
|
+
|
3474
3635
|
Style/OrAssignment:
|
3475
3636
|
Description: 'Recommend usage of double pipe equals (||=) where applicable.'
|
3476
3637
|
StyleGuide: '#double-pipe-for-uninit'
|
@@ -3567,6 +3728,11 @@ Style/RandomWithOffset:
|
|
3567
3728
|
Enabled: true
|
3568
3729
|
VersionAdded: '0.52'
|
3569
3730
|
|
3731
|
+
Style/RedundantAssignment:
|
3732
|
+
Description: 'Checks for redundant assignment before returning.'
|
3733
|
+
Enabled: 'pending'
|
3734
|
+
VersionAdded: '0.87'
|
3735
|
+
|
3570
3736
|
Style/RedundantBegin:
|
3571
3737
|
Description: "Don't use begin blocks when they are not needed."
|
3572
3738
|
StyleGuide: '#begin-implicit'
|
@@ -3596,6 +3762,27 @@ Style/RedundantException:
|
|
3596
3762
|
VersionAdded: '0.14'
|
3597
3763
|
VersionChanged: '0.29'
|
3598
3764
|
|
3765
|
+
Style/RedundantFetchBlock:
|
3766
|
+
Description: >-
|
3767
|
+
Use `fetch(key, value)` instead of `fetch(key) { value }`
|
3768
|
+
when value has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or is a constant.
|
3769
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashfetch-with-argument-vs-hashfetch--block-code'
|
3770
|
+
Enabled: 'pending'
|
3771
|
+
Safe: false
|
3772
|
+
# If enabled, this cop will autocorrect usages of
|
3773
|
+
# `fetch` being called with block returning a constant.
|
3774
|
+
# This can be dangerous since constants will not be defined at that moment.
|
3775
|
+
SafeForConstants: false
|
3776
|
+
VersionAdded: '0.86'
|
3777
|
+
|
3778
|
+
Style/RedundantFileExtensionInRequire:
|
3779
|
+
Description: >-
|
3780
|
+
Checks for the presence of superfluous `.rb` extension in
|
3781
|
+
the filename provided to `require` and `require_relative`.
|
3782
|
+
StyleGuide: '#no-explicit-rb-to-require'
|
3783
|
+
Enabled: 'pending'
|
3784
|
+
VersionAdded: '0.88'
|
3785
|
+
|
3599
3786
|
Style/RedundantFreeze:
|
3600
3787
|
Description: "Checks usages of Object#freeze on immutable objects."
|
3601
3788
|
Enabled: true
|
@@ -3763,6 +3950,12 @@ Style/SignalException:
|
|
3763
3950
|
- only_fail
|
3764
3951
|
- semantic
|
3765
3952
|
|
3953
|
+
Style/SingleArgumentDig:
|
3954
|
+
Description: 'Avoid using single argument dig method.'
|
3955
|
+
Enabled: pending
|
3956
|
+
VersionAdded: '0.89'
|
3957
|
+
Safe: false
|
3958
|
+
|
3766
3959
|
Style/SingleLineBlockParams:
|
3767
3960
|
Description: 'Enforces the names of some block params.'
|
3768
3961
|
Enabled: false
|
@@ -3818,6 +4011,13 @@ Style/StderrPuts:
|
|
3818
4011
|
Enabled: true
|
3819
4012
|
VersionAdded: '0.51'
|
3820
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
|
+
|
3821
4021
|
Style/StringHashKeys:
|
3822
4022
|
Description: 'Prefer symbols instead of strings as hash keys.'
|
3823
4023
|
StyleGuide: '#symbols-as-keys'
|
@@ -3875,6 +4075,7 @@ Style/StructInheritance:
|
|
3875
4075
|
StyleGuide: '#no-extend-struct-new'
|
3876
4076
|
Enabled: true
|
3877
4077
|
VersionAdded: '0.29'
|
4078
|
+
VersionChanged: '0.86'
|
3878
4079
|
|
3879
4080
|
Style/SymbolArray:
|
3880
4081
|
Description: 'Use %i or %I for arrays of symbols.'
|
@@ -3896,7 +4097,7 @@ Style/SymbolLiteral:
|
|
3896
4097
|
Style/SymbolProc:
|
3897
4098
|
Description: 'Use symbols as procs instead of blocks when possible.'
|
3898
4099
|
Enabled: true
|
3899
|
-
|
4100
|
+
Safe: false
|
3900
4101
|
VersionAdded: '0.26'
|
3901
4102
|
VersionChanged: '0.64'
|
3902
4103
|
# A list of method names to be ignored by the check.
|
data/lib/chefstyle.rb
CHANGED
data/lib/chefstyle/version.rb
CHANGED
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.1
|
4
|
+
version: 1.2.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-
|
11
|
+
date: 2020-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.89.1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.89.1
|
69
69
|
description:
|
70
70
|
email:
|
71
71
|
- oss@chef.io
|