chefstyle 1.4.4 → 1.5.6
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/chefstyle.yml +22 -4
- data/config/disable_all.yml +32 -0
- data/config/upstream.yml +278 -89
- data/lib/chefstyle/version.rb +2 -2
- data/lib/rubocop/cop/chef/ruby/gemspec_require_rubygems.rb +1 -1
- data/lib/rubocop/cop/chef/ruby/require_net_https.rb +1 -1
- data/lib/rubocop/cop/chef/ruby/ruby_27_keyword_argument_warnings.rb +1 -1
- data/lib/rubocop/cop/chef/ruby/unless_defined_require.rb +1 -1
- 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: 5eafee1ab58f15782ca6a720315f9502822f1d0e63e07d33e271d987bad49c64
|
|
4
|
+
data.tar.gz: 0004d5f5a676d1801b4b2e6fb786e026874261ef9f636660eb3e3403cbed5108
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d5c292f15541edf15ecdaea4d135b893550a28ca242b449fa7c05c74644b98d3c8927db666d46f6d30c63be5521dbb58fd7b740d753a7bd38baf651386c2ace
|
|
7
|
+
data.tar.gz: ba0275de1384c823209345d28ff82ab5ef484371491334a1aa110bb86abfc9a61f0795295aaa1b402d0b9bb5fb7ec34038fed04b4000f605f45ce2808eabb6dd
|
data/config/chefstyle.yml
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
AllCops:
|
|
2
2
|
TargetRubyVersion: 2.4
|
|
3
|
+
SuggestExtensions: false
|
|
3
4
|
|
|
4
5
|
#
|
|
5
6
|
# Bundler
|
|
@@ -243,6 +244,7 @@ Layout/EmptyLineAfterGuardClause:
|
|
|
243
244
|
Enabled: true
|
|
244
245
|
Layout/EmptyLineBetweenDefs:
|
|
245
246
|
Enabled: true
|
|
247
|
+
AllowAdjacentOneLineDefs: true
|
|
246
248
|
Layout/EmptyLines:
|
|
247
249
|
Enabled: true
|
|
248
250
|
Layout/EmptyLinesAroundAccessModifier:
|
|
@@ -669,26 +671,42 @@ Style/ExpandPathArguments:
|
|
|
669
671
|
Lint/RedundantSafeNavigation:
|
|
670
672
|
Enabled: true
|
|
671
673
|
|
|
672
|
-
|
|
674
|
+
# Eases readability
|
|
675
|
+
Lint/RedundantStringCoercion:
|
|
676
|
+
Enabled: true
|
|
677
|
+
|
|
678
|
+
# unnecessary complexity
|
|
679
|
+
Lint/RedundantWithObject:
|
|
680
|
+
Enabled: true
|
|
681
|
+
|
|
682
|
+
# unnecessary complexity
|
|
683
|
+
Lint/RedundantWithIndex:
|
|
684
|
+
Enabled: true
|
|
685
|
+
|
|
686
|
+
# avoid requiring twice
|
|
687
|
+
Lint/DuplicateRequire:
|
|
688
|
+
Enabled: true
|
|
689
|
+
|
|
690
|
+
Chef/Ruby/Ruby27KeywordArgumentWarnings:
|
|
673
691
|
Description: Pass options to shell_out helpers without the brackets to avoid Ruby 2.7 deprecation warnings.
|
|
674
692
|
Enabled: true
|
|
675
693
|
VersionAdded: '1.3.0'
|
|
676
694
|
|
|
677
|
-
|
|
695
|
+
Chef/Ruby/UnlessDefinedRequire:
|
|
678
696
|
Description: Workaround RubyGems' slow requires by only running require if the constant isn't already defined
|
|
679
697
|
Enabled: true
|
|
680
698
|
VersionAdded: '1.3.0'
|
|
681
699
|
Include:
|
|
682
700
|
- 'lib/**/*'
|
|
683
701
|
|
|
684
|
-
|
|
702
|
+
Chef/Ruby/GemspecRequireRubygems:
|
|
685
703
|
Description: Rubygems does not need to be required in a Gemspec
|
|
686
704
|
Enabled: true
|
|
687
705
|
VersionAdded: '1.3.0'
|
|
688
706
|
Include:
|
|
689
707
|
- '**/*.gemspec'
|
|
690
708
|
|
|
691
|
-
|
|
709
|
+
Chef/Ruby/RequireNetHttps:
|
|
692
710
|
Description: net/https is deprecated and just includes net/http and openssl. We should include those directly instead
|
|
693
711
|
Enabled: true
|
|
694
712
|
VersionAdded: '1.3.0'
|
data/config/disable_all.yml
CHANGED
|
@@ -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:
|
|
@@ -303,6 +311,8 @@ Lint/NestedPercentLiteral:
|
|
|
303
311
|
Enabled: false
|
|
304
312
|
Lint/NextWithoutAccumulator:
|
|
305
313
|
Enabled: false
|
|
314
|
+
Lint/NoReturnInBeginEndBlocks:
|
|
315
|
+
Enabled: false
|
|
306
316
|
Lint/NonDeterministicRequireOrder:
|
|
307
317
|
Enabled: false
|
|
308
318
|
Lint/NonLocalExitFromIterator:
|
|
@@ -373,6 +383,8 @@ Lint/SuppressedException:
|
|
|
373
383
|
Enabled: false
|
|
374
384
|
Lint/Syntax:
|
|
375
385
|
Enabled: false
|
|
386
|
+
Lint/ToEnumArguments:
|
|
387
|
+
Enabled: false
|
|
376
388
|
Lint/ToJSON:
|
|
377
389
|
Enabled: false
|
|
378
390
|
Lint/TopLevelReturnWithArgument:
|
|
@@ -381,8 +393,12 @@ Lint/TrailingCommaInAttributeDeclaration:
|
|
|
381
393
|
Enabled: false
|
|
382
394
|
Lint/UnderscorePrefixedVariableName:
|
|
383
395
|
Enabled: false
|
|
396
|
+
Lint/UnexpectedBlockArity:
|
|
397
|
+
Enabled: false
|
|
384
398
|
Lint/UnifiedInteger:
|
|
385
399
|
Enabled: false
|
|
400
|
+
Lint/UnmodifiedReduceAccumulator:
|
|
401
|
+
Enabled: false
|
|
386
402
|
Lint/UnreachableCode:
|
|
387
403
|
Enabled: false
|
|
388
404
|
Lint/UnreachableLoop:
|
|
@@ -467,6 +483,8 @@ Style/Alias:
|
|
|
467
483
|
Enabled: false
|
|
468
484
|
Style/AndOr:
|
|
469
485
|
Enabled: false
|
|
486
|
+
Style/ArgumentsForwarding:
|
|
487
|
+
Enabled: false
|
|
470
488
|
Style/ArrayCoercion:
|
|
471
489
|
Enabled: false
|
|
472
490
|
Style/ArrayJoin:
|
|
@@ -505,6 +523,8 @@ Style/ClassMethodsDefinitions:
|
|
|
505
523
|
Enabled: false
|
|
506
524
|
Style/ClassVars:
|
|
507
525
|
Enabled: false
|
|
526
|
+
Style/CollectionCompact:
|
|
527
|
+
Enabled: false
|
|
508
528
|
Style/CollectionMethods:
|
|
509
529
|
Enabled: false
|
|
510
530
|
Style/ColonMethodCall:
|
|
@@ -537,6 +557,8 @@ Style/DocumentationMethod:
|
|
|
537
557
|
Enabled: false
|
|
538
558
|
Style/Documentation:
|
|
539
559
|
Enabled: false
|
|
560
|
+
Style/DocumentDynamicEvalDefinition:
|
|
561
|
+
Enabled: false
|
|
540
562
|
Style/DoubleCopDisableDirective:
|
|
541
563
|
Enabled: false
|
|
542
564
|
Style/DoubleNegation:
|
|
@@ -641,6 +663,8 @@ Style/RedundantSelfAssignment:
|
|
|
641
663
|
Enabled: false
|
|
642
664
|
Style/SoleNestedConditional:
|
|
643
665
|
Enabled: false
|
|
666
|
+
Style/StaticClass:
|
|
667
|
+
Enabled: false
|
|
644
668
|
Style/MethodCalledOnDoEndBlock:
|
|
645
669
|
Enabled: false
|
|
646
670
|
Style/MethodDefParentheses:
|
|
@@ -677,6 +701,8 @@ Style/MutableConstant:
|
|
|
677
701
|
Enabled: false
|
|
678
702
|
Style/NegatedIf:
|
|
679
703
|
Enabled: false
|
|
704
|
+
Style/NegatedIfElseCondition:
|
|
705
|
+
Enabled: false
|
|
680
706
|
Style/NegatedUnless:
|
|
681
707
|
Enabled: false
|
|
682
708
|
Style/NegatedWhile:
|
|
@@ -691,6 +717,8 @@ Style/Next:
|
|
|
691
717
|
Enabled: false
|
|
692
718
|
Style/NilComparison:
|
|
693
719
|
Enabled: false
|
|
720
|
+
Style/NilLambda:
|
|
721
|
+
Enabled: false
|
|
694
722
|
Style/NonNilCheck:
|
|
695
723
|
Enabled: false
|
|
696
724
|
Style/Not:
|
|
@@ -729,6 +757,8 @@ Style/RaiseArgs:
|
|
|
729
757
|
Enabled: false
|
|
730
758
|
Style/RandomWithOffset:
|
|
731
759
|
Enabled: false
|
|
760
|
+
Style/RedundantArgument:
|
|
761
|
+
Enabled: false
|
|
732
762
|
Style/RedundantBegin:
|
|
733
763
|
Enabled: false
|
|
734
764
|
Style/RedundantCapitalW:
|
|
@@ -807,6 +837,8 @@ Style/Strip:
|
|
|
807
837
|
Enabled: false
|
|
808
838
|
Style/StructInheritance:
|
|
809
839
|
Enabled: false
|
|
840
|
+
Style/SwapValues:
|
|
841
|
+
Enabled: false
|
|
810
842
|
Style/SymbolArray:
|
|
811
843
|
Enabled: false
|
|
812
844
|
Style/SymbolLiteral:
|
data/config/upstream.yml
CHANGED
|
@@ -139,6 +139,16 @@ AllCops:
|
|
|
139
139
|
# from the lock file.) If the Ruby version is still unresolved, RuboCop will
|
|
140
140
|
# use the oldest officially supported Ruby version (currently Ruby 2.4).
|
|
141
141
|
TargetRubyVersion: ~
|
|
142
|
+
# Determines if a notification for extension libraries should be shown when
|
|
143
|
+
# rubocop is run. Keys are the name of the extension, and values are an array
|
|
144
|
+
# of gems in the Gemfile that the extension is suggested for, if not already
|
|
145
|
+
# included.
|
|
146
|
+
SuggestExtensions:
|
|
147
|
+
rubocop-rails: [rails]
|
|
148
|
+
rubocop-rspec: [rspec, rspec-rails]
|
|
149
|
+
rubocop-minitest: [minitest]
|
|
150
|
+
rubocop-sequel: [sequel]
|
|
151
|
+
rubocop-rake: [rake]
|
|
142
152
|
|
|
143
153
|
#################### Bundler ###############################
|
|
144
154
|
|
|
@@ -313,7 +323,7 @@ Layout/AssignmentIndentation:
|
|
|
313
323
|
|
|
314
324
|
Layout/BeginEndAlignment:
|
|
315
325
|
Description: 'Align ends corresponding to begins correctly.'
|
|
316
|
-
Enabled:
|
|
326
|
+
Enabled: true
|
|
317
327
|
VersionAdded: '0.91'
|
|
318
328
|
# The value `start_of_line` means that `end` should be aligned the start of the line
|
|
319
329
|
# where the `begin` keyword is.
|
|
@@ -459,10 +469,14 @@ Layout/EmptyLineAfterMultilineCondition:
|
|
|
459
469
|
- https://github.com/airbnb/ruby#multiline-if-newline
|
|
460
470
|
|
|
461
471
|
Layout/EmptyLineBetweenDefs:
|
|
462
|
-
Description: 'Use empty lines between defs.'
|
|
472
|
+
Description: 'Use empty lines between class/module/method defs.'
|
|
463
473
|
StyleGuide: '#empty-lines-between-methods'
|
|
464
474
|
Enabled: true
|
|
465
475
|
VersionAdded: '0.49'
|
|
476
|
+
VersionChanged: '1.4'
|
|
477
|
+
EmptyLineBetweenMethodDefs: true
|
|
478
|
+
EmptyLineBetweenClassDefs: true
|
|
479
|
+
EmptyLineBetweenModuleDefs: true
|
|
466
480
|
# If `true`, this parameter means that single line method definitions don't
|
|
467
481
|
# need an empty line between them.
|
|
468
482
|
AllowAdjacentOneLineDefs: false
|
|
@@ -496,7 +510,7 @@ Layout/EmptyLinesAroundArguments:
|
|
|
496
510
|
Layout/EmptyLinesAroundAttributeAccessor:
|
|
497
511
|
Description: "Keep blank lines around attribute accessors."
|
|
498
512
|
StyleGuide: '#empty-lines-around-attribute-accessor'
|
|
499
|
-
Enabled:
|
|
513
|
+
Enabled: true
|
|
500
514
|
VersionAdded: '0.83'
|
|
501
515
|
VersionChanged: '0.84'
|
|
502
516
|
AllowAliasSyntax: true
|
|
@@ -891,8 +905,8 @@ Layout/LineLength:
|
|
|
891
905
|
StyleGuide: '#max-line-length'
|
|
892
906
|
Enabled: true
|
|
893
907
|
VersionAdded: '0.25'
|
|
894
|
-
VersionChanged: '
|
|
895
|
-
AutoCorrect:
|
|
908
|
+
VersionChanged: '1.4'
|
|
909
|
+
AutoCorrect: true
|
|
896
910
|
Max: 120
|
|
897
911
|
# To make it possible to copy or click on URIs in the code, we allow lines
|
|
898
912
|
# containing a URI to be longer than Max.
|
|
@@ -1145,7 +1159,7 @@ Layout/SpaceAroundKeyword:
|
|
|
1145
1159
|
|
|
1146
1160
|
Layout/SpaceAroundMethodCallOperator:
|
|
1147
1161
|
Description: 'Checks method call operators to not have spaces around them.'
|
|
1148
|
-
Enabled:
|
|
1162
|
+
Enabled: true
|
|
1149
1163
|
VersionAdded: '0.82'
|
|
1150
1164
|
|
|
1151
1165
|
Layout/SpaceAroundOperators:
|
|
@@ -1176,7 +1190,7 @@ Layout/SpaceBeforeBlockBraces:
|
|
|
1176
1190
|
SupportedStylesForEmptyBraces:
|
|
1177
1191
|
- space
|
|
1178
1192
|
- no_space
|
|
1179
|
-
VersionChanged: '0.52
|
|
1193
|
+
VersionChanged: '0.52'
|
|
1180
1194
|
|
|
1181
1195
|
Layout/SpaceBeforeComma:
|
|
1182
1196
|
Description: 'No spaces before commas.'
|
|
@@ -1334,8 +1348,8 @@ Layout/TrailingWhitespace:
|
|
|
1334
1348
|
StyleGuide: '#no-trailing-whitespace'
|
|
1335
1349
|
Enabled: true
|
|
1336
1350
|
VersionAdded: '0.49'
|
|
1337
|
-
VersionChanged: '0
|
|
1338
|
-
AllowInHeredoc:
|
|
1351
|
+
VersionChanged: '1.0'
|
|
1352
|
+
AllowInHeredoc: false
|
|
1339
1353
|
|
|
1340
1354
|
#################### Lint ##################################
|
|
1341
1355
|
### Warnings
|
|
@@ -1379,7 +1393,7 @@ Lint/BigDecimalNew:
|
|
|
1379
1393
|
|
|
1380
1394
|
Lint/BinaryOperatorWithIdenticalOperands:
|
|
1381
1395
|
Description: 'This cop checks for places where binary operator has identical operands.'
|
|
1382
|
-
Enabled:
|
|
1396
|
+
Enabled: true
|
|
1383
1397
|
Safe: false
|
|
1384
1398
|
VersionAdded: '0.89'
|
|
1385
1399
|
|
|
@@ -1398,8 +1412,13 @@ Lint/CircularArgumentReference:
|
|
|
1398
1412
|
Lint/ConstantDefinitionInBlock:
|
|
1399
1413
|
Description: 'Do not define constants within a block.'
|
|
1400
1414
|
StyleGuide: '#no-constant-definition-in-block'
|
|
1401
|
-
Enabled:
|
|
1415
|
+
Enabled: true
|
|
1402
1416
|
VersionAdded: '0.91'
|
|
1417
|
+
VersionChanged: '1.3'
|
|
1418
|
+
# `enums` for Typed Enums via T::Enum in Sorbet.
|
|
1419
|
+
# https://sorbet.org/docs/tenum
|
|
1420
|
+
AllowedMethods:
|
|
1421
|
+
- enums
|
|
1403
1422
|
|
|
1404
1423
|
Lint/ConstantResolution:
|
|
1405
1424
|
Description: 'Check that constants are fully qualified with `::`.'
|
|
@@ -1415,6 +1434,22 @@ Lint/Debugger:
|
|
|
1415
1434
|
Enabled: true
|
|
1416
1435
|
VersionAdded: '0.14'
|
|
1417
1436
|
VersionChanged: '0.49'
|
|
1437
|
+
DebuggerReceivers:
|
|
1438
|
+
- binding
|
|
1439
|
+
- Kernel
|
|
1440
|
+
- Pry
|
|
1441
|
+
DebuggerMethods:
|
|
1442
|
+
- debugger
|
|
1443
|
+
- byebug
|
|
1444
|
+
- remote_byebug
|
|
1445
|
+
- pry
|
|
1446
|
+
- remote_pry
|
|
1447
|
+
- pry_remote
|
|
1448
|
+
- console
|
|
1449
|
+
- rescue
|
|
1450
|
+
- save_and_open_page
|
|
1451
|
+
- save_and_open_screenshot
|
|
1452
|
+
- irb
|
|
1418
1453
|
|
|
1419
1454
|
Lint/DeprecatedClassMethods:
|
|
1420
1455
|
Description: 'Check for deprecated class method calls.'
|
|
@@ -1423,7 +1458,7 @@ Lint/DeprecatedClassMethods:
|
|
|
1423
1458
|
|
|
1424
1459
|
Lint/DeprecatedOpenSSLConstant:
|
|
1425
1460
|
Description: "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`."
|
|
1426
|
-
Enabled:
|
|
1461
|
+
Enabled: true
|
|
1427
1462
|
VersionAdded: '0.84'
|
|
1428
1463
|
|
|
1429
1464
|
Lint/DisjunctiveAssignmentInConstructor:
|
|
@@ -1433,6 +1468,11 @@ Lint/DisjunctiveAssignmentInConstructor:
|
|
|
1433
1468
|
VersionAdded: '0.62'
|
|
1434
1469
|
VersionChanged: '0.88'
|
|
1435
1470
|
|
|
1471
|
+
Lint/DuplicateBranch:
|
|
1472
|
+
Description: Checks that there are no repeated bodies within `if/unless`, `case-when` and `rescue` constructs.
|
|
1473
|
+
Enabled: pending
|
|
1474
|
+
VersionAdded: '1.3'
|
|
1475
|
+
|
|
1436
1476
|
Lint/DuplicateCaseCondition:
|
|
1437
1477
|
Description: 'Do not repeat values in case conditionals.'
|
|
1438
1478
|
Enabled: true
|
|
@@ -1440,7 +1480,7 @@ Lint/DuplicateCaseCondition:
|
|
|
1440
1480
|
|
|
1441
1481
|
Lint/DuplicateElsifCondition:
|
|
1442
1482
|
Description: 'Do not repeat conditions used in if `elsif`.'
|
|
1443
|
-
Enabled:
|
|
1483
|
+
Enabled: true
|
|
1444
1484
|
VersionAdded: '0.88'
|
|
1445
1485
|
|
|
1446
1486
|
Lint/DuplicateHashKey:
|
|
@@ -1454,14 +1494,19 @@ Lint/DuplicateMethods:
|
|
|
1454
1494
|
Enabled: true
|
|
1455
1495
|
VersionAdded: '0.29'
|
|
1456
1496
|
|
|
1497
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
|
1498
|
+
Description: 'Checks for duplicate elements in Regexp character classes.'
|
|
1499
|
+
Enabled: pending
|
|
1500
|
+
VersionAdded: '1.1'
|
|
1501
|
+
|
|
1457
1502
|
Lint/DuplicateRequire:
|
|
1458
1503
|
Description: 'Check for duplicate `require`s and `require_relative`s.'
|
|
1459
|
-
Enabled:
|
|
1504
|
+
Enabled: true
|
|
1460
1505
|
VersionAdded: '0.90'
|
|
1461
1506
|
|
|
1462
1507
|
Lint/DuplicateRescueException:
|
|
1463
1508
|
Description: 'Checks that there are no repeated exceptions used in `rescue` expressions.'
|
|
1464
|
-
Enabled:
|
|
1509
|
+
Enabled: true
|
|
1465
1510
|
VersionAdded: '0.89'
|
|
1466
1511
|
|
|
1467
1512
|
Lint/EachWithObjectArgument:
|
|
@@ -1473,10 +1518,25 @@ Lint/ElseLayout:
|
|
|
1473
1518
|
Description: 'Check for odd code arrangement in an else block.'
|
|
1474
1519
|
Enabled: true
|
|
1475
1520
|
VersionAdded: '0.17'
|
|
1521
|
+
VersionChanged: '1.2'
|
|
1522
|
+
|
|
1523
|
+
Lint/EmptyBlock:
|
|
1524
|
+
Description: 'This cop checks for blocks without a body.'
|
|
1525
|
+
Enabled: pending
|
|
1526
|
+
VersionAdded: '1.1'
|
|
1527
|
+
VersionChanged: '1.3'
|
|
1528
|
+
AllowComments: true
|
|
1529
|
+
AllowEmptyLambdas: true
|
|
1530
|
+
|
|
1531
|
+
Lint/EmptyClass:
|
|
1532
|
+
Description: 'Checks for classes and metaclasses without a body.'
|
|
1533
|
+
Enabled: pending
|
|
1534
|
+
VersionAdded: '1.3'
|
|
1535
|
+
AllowComments: false
|
|
1476
1536
|
|
|
1477
1537
|
Lint/EmptyConditionalBody:
|
|
1478
1538
|
Description: 'This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.'
|
|
1479
|
-
Enabled:
|
|
1539
|
+
Enabled: true
|
|
1480
1540
|
AllowComments: true
|
|
1481
1541
|
VersionAdded: '0.89'
|
|
1482
1542
|
|
|
@@ -1493,7 +1553,7 @@ Lint/EmptyExpression:
|
|
|
1493
1553
|
|
|
1494
1554
|
Lint/EmptyFile:
|
|
1495
1555
|
Description: 'Enforces that Ruby source files are not empty.'
|
|
1496
|
-
Enabled:
|
|
1556
|
+
Enabled: true
|
|
1497
1557
|
AllowComments: true
|
|
1498
1558
|
VersionAdded: '0.90'
|
|
1499
1559
|
|
|
@@ -1531,7 +1591,7 @@ Lint/FlipFlop:
|
|
|
1531
1591
|
Lint/FloatComparison:
|
|
1532
1592
|
Description: 'Checks for the presence of precise comparison of floating point numbers.'
|
|
1533
1593
|
StyleGuide: '#float-comparison'
|
|
1534
|
-
Enabled:
|
|
1594
|
+
Enabled: true
|
|
1535
1595
|
VersionAdded: '0.89'
|
|
1536
1596
|
|
|
1537
1597
|
Lint/FloatOutOfRange:
|
|
@@ -1549,7 +1609,7 @@ Lint/FormatParameterMismatch:
|
|
|
1549
1609
|
Lint/HashCompareByIdentity:
|
|
1550
1610
|
Description: 'Prefer using `Hash#compare_by_identity` than using `object_id` for keys.'
|
|
1551
1611
|
StyleGuide: '#identity-comparison'
|
|
1552
|
-
Enabled:
|
|
1612
|
+
Enabled: true
|
|
1553
1613
|
Safe: false
|
|
1554
1614
|
VersionAdded: '0.93'
|
|
1555
1615
|
|
|
@@ -1563,7 +1623,7 @@ Lint/HeredocMethodCallPosition:
|
|
|
1563
1623
|
|
|
1564
1624
|
Lint/IdentityComparison:
|
|
1565
1625
|
Description: 'Prefer `equal?` over `==` when comparing `object_id`.'
|
|
1566
|
-
Enabled:
|
|
1626
|
+
Enabled: true
|
|
1567
1627
|
StyleGuide: '#identity-comparison'
|
|
1568
1628
|
VersionAdded: '0.91'
|
|
1569
1629
|
|
|
@@ -1616,7 +1676,8 @@ Lint/Loop:
|
|
|
1616
1676
|
StyleGuide: '#loop-with-break'
|
|
1617
1677
|
Enabled: true
|
|
1618
1678
|
VersionAdded: '0.9'
|
|
1619
|
-
VersionChanged: '
|
|
1679
|
+
VersionChanged: '1.3'
|
|
1680
|
+
Safe: false
|
|
1620
1681
|
|
|
1621
1682
|
Lint/MissingCopEnableDirective:
|
|
1622
1683
|
Description: 'Checks for a `# rubocop:enable` after `# rubocop:disable`.'
|
|
@@ -1635,19 +1696,21 @@ Lint/MissingSuper:
|
|
|
1635
1696
|
Description: >-
|
|
1636
1697
|
This cop checks for the presence of constructors and lifecycle callbacks
|
|
1637
1698
|
without calls to `super`'.
|
|
1638
|
-
Enabled:
|
|
1699
|
+
Enabled: true
|
|
1639
1700
|
VersionAdded: '0.89'
|
|
1701
|
+
VersionChanged: '1.4'
|
|
1640
1702
|
|
|
1641
1703
|
Lint/MixedRegexpCaptureTypes:
|
|
1642
1704
|
Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
|
|
1643
|
-
Enabled:
|
|
1705
|
+
Enabled: true
|
|
1644
1706
|
VersionAdded: '0.85'
|
|
1645
1707
|
|
|
1646
1708
|
Lint/MultipleComparison:
|
|
1647
1709
|
Description: "Use `&&` operator to compare multiple values."
|
|
1648
1710
|
Enabled: true
|
|
1649
1711
|
VersionAdded: '0.47'
|
|
1650
|
-
VersionChanged: '
|
|
1712
|
+
VersionChanged: '1.1'
|
|
1713
|
+
AllowMethodComparison: true
|
|
1651
1714
|
|
|
1652
1715
|
Lint/NestedMethodDefinition:
|
|
1653
1716
|
Description: 'Do not use nested method definitions.'
|
|
@@ -1667,6 +1730,11 @@ Lint/NextWithoutAccumulator:
|
|
|
1667
1730
|
Enabled: true
|
|
1668
1731
|
VersionAdded: '0.36'
|
|
1669
1732
|
|
|
1733
|
+
Lint/NoReturnInBeginEndBlocks:
|
|
1734
|
+
Description: 'Do not `return` inside `begin..end` blocks in assignment contexts.'
|
|
1735
|
+
Enabled: pending
|
|
1736
|
+
VersionAdded: '1.2'
|
|
1737
|
+
|
|
1670
1738
|
Lint/NonDeterministicRequireOrder:
|
|
1671
1739
|
Description: 'Always sort arrays returned by Dir.glob when requiring files.'
|
|
1672
1740
|
Enabled: true
|
|
@@ -1682,8 +1750,12 @@ Lint/NumberConversion:
|
|
|
1682
1750
|
Description: 'Checks unsafe usage of number conversion methods.'
|
|
1683
1751
|
Enabled: false
|
|
1684
1752
|
VersionAdded: '0.53'
|
|
1685
|
-
VersionChanged: '
|
|
1753
|
+
VersionChanged: '1.1'
|
|
1686
1754
|
SafeAutoCorrect: false
|
|
1755
|
+
IgnoredMethods: []
|
|
1756
|
+
IgnoredClasses:
|
|
1757
|
+
- Time
|
|
1758
|
+
- DateTime
|
|
1687
1759
|
|
|
1688
1760
|
Lint/OrderedMagicComments:
|
|
1689
1761
|
Description: 'Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.'
|
|
@@ -1692,7 +1764,7 @@ Lint/OrderedMagicComments:
|
|
|
1692
1764
|
|
|
1693
1765
|
Lint/OutOfRangeRegexpRef:
|
|
1694
1766
|
Description: 'Checks for out of range reference for Regexp because it always returns nil.'
|
|
1695
|
-
Enabled:
|
|
1767
|
+
Enabled: true
|
|
1696
1768
|
Safe: false
|
|
1697
1769
|
VersionAdded: '0.89'
|
|
1698
1770
|
|
|
@@ -1721,7 +1793,7 @@ Lint/PercentSymbolArray:
|
|
|
1721
1793
|
Lint/RaiseException:
|
|
1722
1794
|
Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
|
|
1723
1795
|
StyleGuide: '#raise-exception'
|
|
1724
|
-
Enabled:
|
|
1796
|
+
Enabled: true
|
|
1725
1797
|
Safe: false
|
|
1726
1798
|
VersionAdded: '0.81'
|
|
1727
1799
|
VersionChanged: '0.86'
|
|
@@ -1755,18 +1827,16 @@ Lint/RedundantRequireStatement:
|
|
|
1755
1827
|
|
|
1756
1828
|
Lint/RedundantSafeNavigation:
|
|
1757
1829
|
Description: 'Checks for redundant safe navigation calls.'
|
|
1758
|
-
Enabled:
|
|
1830
|
+
Enabled: true
|
|
1759
1831
|
VersionAdded: '0.93'
|
|
1832
|
+
AllowedMethods:
|
|
1833
|
+
- instance_of?
|
|
1834
|
+
- kind_of?
|
|
1835
|
+
- is_a?
|
|
1836
|
+
- eql?
|
|
1837
|
+
- respond_to?
|
|
1838
|
+
- equal?
|
|
1760
1839
|
Safe: false
|
|
1761
|
-
IgnoredMethods:
|
|
1762
|
-
- to_c
|
|
1763
|
-
- to_f
|
|
1764
|
-
- to_i
|
|
1765
|
-
- to_r
|
|
1766
|
-
- rationalize
|
|
1767
|
-
- public_send
|
|
1768
|
-
- send
|
|
1769
|
-
- __send__
|
|
1770
1840
|
|
|
1771
1841
|
Lint/RedundantSplatExpansion:
|
|
1772
1842
|
Description: 'Checks for splat unnecessarily being called on literals.'
|
|
@@ -1810,7 +1880,7 @@ Lint/RescueException:
|
|
|
1810
1880
|
StyleGuide: '#no-blind-rescues'
|
|
1811
1881
|
Enabled: true
|
|
1812
1882
|
VersionAdded: '0.9'
|
|
1813
|
-
VersionChanged: '0.27
|
|
1883
|
+
VersionChanged: '0.27'
|
|
1814
1884
|
|
|
1815
1885
|
Lint/RescueType:
|
|
1816
1886
|
Description: 'Avoid rescuing from non constants that could result in a `TypeError`.'
|
|
@@ -1864,7 +1934,7 @@ Lint/ScriptPermission:
|
|
|
1864
1934
|
|
|
1865
1935
|
Lint/SelfAssignment:
|
|
1866
1936
|
Description: 'Checks for self-assignments.'
|
|
1867
|
-
Enabled:
|
|
1937
|
+
Enabled: true
|
|
1868
1938
|
VersionAdded: '0.89'
|
|
1869
1939
|
|
|
1870
1940
|
Lint/SendWithMixinArgument:
|
|
@@ -1895,7 +1965,7 @@ Lint/ShadowingOuterLocalVariable:
|
|
|
1895
1965
|
|
|
1896
1966
|
Lint/StructNewOverride:
|
|
1897
1967
|
Description: 'Disallow overriding the `Struct` built-in methods via `Struct.new`.'
|
|
1898
|
-
Enabled:
|
|
1968
|
+
Enabled: true
|
|
1899
1969
|
VersionAdded: '0.81'
|
|
1900
1970
|
|
|
1901
1971
|
Lint/SuppressedException:
|
|
@@ -1912,6 +1982,11 @@ Lint/Syntax:
|
|
|
1912
1982
|
VersionAdded: '0.9'
|
|
1913
1983
|
|
|
1914
1984
|
|
|
1985
|
+
Lint/ToEnumArguments:
|
|
1986
|
+
Description: 'This cop ensures that `to_enum`/`enum_for`, called for the current method, has correct arguments.'
|
|
1987
|
+
Enabled: pending
|
|
1988
|
+
VersionAdded: '1.1'
|
|
1989
|
+
|
|
1915
1990
|
Lint/ToJSON:
|
|
1916
1991
|
Description: 'Ensure #to_json includes an optional argument.'
|
|
1917
1992
|
Enabled: true
|
|
@@ -1919,12 +1994,12 @@ Lint/ToJSON:
|
|
|
1919
1994
|
|
|
1920
1995
|
Lint/TopLevelReturnWithArgument:
|
|
1921
1996
|
Description: 'This cop detects top level return statements with argument.'
|
|
1922
|
-
Enabled:
|
|
1997
|
+
Enabled: true
|
|
1923
1998
|
VersionAdded: '0.89'
|
|
1924
1999
|
|
|
1925
2000
|
Lint/TrailingCommaInAttributeDeclaration:
|
|
1926
2001
|
Description: 'This cop checks for trailing commas in attribute declarations.'
|
|
1927
|
-
Enabled:
|
|
2002
|
+
Enabled: true
|
|
1928
2003
|
VersionAdded: '0.90'
|
|
1929
2004
|
|
|
1930
2005
|
Lint/UnderscorePrefixedVariableName:
|
|
@@ -1933,11 +2008,34 @@ Lint/UnderscorePrefixedVariableName:
|
|
|
1933
2008
|
VersionAdded: '0.21'
|
|
1934
2009
|
AllowKeywordBlockArguments: false
|
|
1935
2010
|
|
|
2011
|
+
Lint/UnexpectedBlockArity:
|
|
2012
|
+
Description: 'Looks for blocks that have fewer arguments that the calling method expects.'
|
|
2013
|
+
Enabled: pending
|
|
2014
|
+
Safe: false
|
|
2015
|
+
VersionAdded: '1.5'
|
|
2016
|
+
Methods:
|
|
2017
|
+
chunk_while: 2
|
|
2018
|
+
each_with_index: 2
|
|
2019
|
+
each_with_object: 2
|
|
2020
|
+
inject: 2
|
|
2021
|
+
max: 2
|
|
2022
|
+
min: 2
|
|
2023
|
+
minmax: 2
|
|
2024
|
+
reduce: 2
|
|
2025
|
+
slice_when: 2
|
|
2026
|
+
sort: 2
|
|
2027
|
+
|
|
1936
2028
|
Lint/UnifiedInteger:
|
|
1937
2029
|
Description: 'Use Integer instead of Fixnum or Bignum.'
|
|
1938
2030
|
Enabled: true
|
|
1939
2031
|
VersionAdded: '0.43'
|
|
1940
2032
|
|
|
2033
|
+
Lint/UnmodifiedReduceAccumulator:
|
|
2034
|
+
Description: Checks for `reduce` or `inject` blocks that do not update the accumulator each iteration.
|
|
2035
|
+
Enabled: pending
|
|
2036
|
+
VersionAdded: '1.1'
|
|
2037
|
+
VersionChanged: '1.5'
|
|
2038
|
+
|
|
1941
2039
|
Lint/UnreachableCode:
|
|
1942
2040
|
Description: 'Unreachable code.'
|
|
1943
2041
|
Enabled: true
|
|
@@ -1945,7 +2043,7 @@ Lint/UnreachableCode:
|
|
|
1945
2043
|
|
|
1946
2044
|
Lint/UnreachableLoop:
|
|
1947
2045
|
Description: 'This cop checks for loops that will have at most one iteration.'
|
|
1948
|
-
Enabled:
|
|
2046
|
+
Enabled: true
|
|
1949
2047
|
VersionAdded: '0.89'
|
|
1950
2048
|
|
|
1951
2049
|
Lint/UnusedBlockArgument:
|
|
@@ -2004,7 +2102,7 @@ Lint/UselessElseWithoutRescue:
|
|
|
2004
2102
|
|
|
2005
2103
|
Lint/UselessMethodDefinition:
|
|
2006
2104
|
Description: 'Checks for useless method definitions.'
|
|
2007
|
-
Enabled:
|
|
2105
|
+
Enabled: true
|
|
2008
2106
|
VersionAdded: '0.90'
|
|
2009
2107
|
Safe: false
|
|
2010
2108
|
AllowComments: true
|
|
@@ -2012,13 +2110,14 @@ Lint/UselessMethodDefinition:
|
|
|
2012
2110
|
Lint/UselessSetterCall:
|
|
2013
2111
|
Description: 'Checks for useless setter call to a local variable.'
|
|
2014
2112
|
Enabled: true
|
|
2113
|
+
SafeAutoCorrect: false
|
|
2015
2114
|
VersionAdded: '0.13'
|
|
2016
|
-
VersionChanged: '
|
|
2115
|
+
VersionChanged: '1.2'
|
|
2017
2116
|
Safe: false
|
|
2018
2117
|
|
|
2019
2118
|
Lint/UselessTimes:
|
|
2020
2119
|
Description: 'Checks for useless `Integer#times` calls.'
|
|
2021
|
-
Enabled:
|
|
2120
|
+
Enabled: true
|
|
2022
2121
|
VersionAdded: '0.91'
|
|
2023
2122
|
Safe: false
|
|
2024
2123
|
|
|
@@ -2039,21 +2138,23 @@ Metrics/AbcSize:
|
|
|
2039
2138
|
- https://en.wikipedia.org/wiki/ABC_Software_Metric
|
|
2040
2139
|
Enabled: true
|
|
2041
2140
|
VersionAdded: '0.27'
|
|
2042
|
-
VersionChanged: '
|
|
2141
|
+
VersionChanged: '1.5'
|
|
2043
2142
|
# The ABC size is a calculated magnitude, so this number can be an Integer or
|
|
2044
2143
|
# a Float.
|
|
2045
2144
|
IgnoredMethods: []
|
|
2145
|
+
CountRepeatedAttributes: true
|
|
2046
2146
|
Max: 17
|
|
2047
2147
|
|
|
2048
2148
|
Metrics/BlockLength:
|
|
2049
2149
|
Description: 'Avoid long blocks with many lines.'
|
|
2050
2150
|
Enabled: true
|
|
2051
2151
|
VersionAdded: '0.44'
|
|
2052
|
-
VersionChanged: '
|
|
2152
|
+
VersionChanged: '1.5'
|
|
2053
2153
|
CountComments: false # count full line comments?
|
|
2054
2154
|
Max: 25
|
|
2055
2155
|
CountAsOne: []
|
|
2056
|
-
ExcludedMethods:
|
|
2156
|
+
ExcludedMethods: [] # deprecated, retained for backwards compatibility
|
|
2157
|
+
IgnoredMethods:
|
|
2057
2158
|
# By default, exclude the `#refine` method, as it tends to have larger
|
|
2058
2159
|
# associated blocks.
|
|
2059
2160
|
- refine
|
|
@@ -2094,11 +2195,12 @@ Metrics/MethodLength:
|
|
|
2094
2195
|
StyleGuide: '#short-methods'
|
|
2095
2196
|
Enabled: true
|
|
2096
2197
|
VersionAdded: '0.25'
|
|
2097
|
-
VersionChanged: '
|
|
2198
|
+
VersionChanged: '1.5'
|
|
2098
2199
|
CountComments: false # count full line comments?
|
|
2099
2200
|
Max: 10
|
|
2100
2201
|
CountAsOne: []
|
|
2101
|
-
ExcludedMethods: []
|
|
2202
|
+
ExcludedMethods: [] # deprecated, retained for backwards compatibility
|
|
2203
|
+
IgnoredMethods: []
|
|
2102
2204
|
|
|
2103
2205
|
Metrics/ModuleLength:
|
|
2104
2206
|
Description: 'Avoid modules longer than 100 lines of code.'
|
|
@@ -2114,8 +2216,10 @@ Metrics/ParameterLists:
|
|
|
2114
2216
|
StyleGuide: '#too-many-params'
|
|
2115
2217
|
Enabled: true
|
|
2116
2218
|
VersionAdded: '0.25'
|
|
2219
|
+
VersionChanged: '1.5'
|
|
2117
2220
|
Max: 5
|
|
2118
2221
|
CountKeywordArgs: true
|
|
2222
|
+
MaxOptionalParameters: 3
|
|
2119
2223
|
|
|
2120
2224
|
Metrics/PerceivedComplexity:
|
|
2121
2225
|
Description: >-
|
|
@@ -2157,6 +2261,7 @@ Naming/BinaryOperatorParameterName:
|
|
|
2157
2261
|
StyleGuide: '#other-arg'
|
|
2158
2262
|
Enabled: true
|
|
2159
2263
|
VersionAdded: '0.50'
|
|
2264
|
+
VersionChanged: '1.2'
|
|
2160
2265
|
|
|
2161
2266
|
Naming/BlockParameterName:
|
|
2162
2267
|
Description: >-
|
|
@@ -2263,6 +2368,7 @@ Naming/HeredocDelimiterCase:
|
|
|
2263
2368
|
StyleGuide: '#heredoc-delimiters'
|
|
2264
2369
|
Enabled: true
|
|
2265
2370
|
VersionAdded: '0.50'
|
|
2371
|
+
VersionChanged: '1.2'
|
|
2266
2372
|
EnforcedStyle: uppercase
|
|
2267
2373
|
SupportedStyles:
|
|
2268
2374
|
- lowercase
|
|
@@ -2281,7 +2387,7 @@ Naming/MemoizedInstanceVariableName:
|
|
|
2281
2387
|
Memoized method name should match memo instance variable name.
|
|
2282
2388
|
Enabled: true
|
|
2283
2389
|
VersionAdded: '0.53'
|
|
2284
|
-
VersionChanged: '
|
|
2390
|
+
VersionChanged: '1.2'
|
|
2285
2391
|
EnforcedStyleForLeadingUnderscores: disallowed
|
|
2286
2392
|
SupportedStylesForLeadingUnderscores:
|
|
2287
2393
|
- disallowed
|
|
@@ -2379,14 +2485,25 @@ Naming/VariableName:
|
|
|
2379
2485
|
- camelCase
|
|
2380
2486
|
|
|
2381
2487
|
Naming/VariableNumber:
|
|
2382
|
-
Description: 'Use the configured style when numbering variables.'
|
|
2488
|
+
Description: 'Use the configured style when numbering symbols, methods and variables.'
|
|
2489
|
+
StyleGuide: '#snake-case-symbols-methods-vars-with-numbers'
|
|
2383
2490
|
Enabled: true
|
|
2384
2491
|
VersionAdded: '0.50'
|
|
2492
|
+
VersionChanged: '1.4'
|
|
2385
2493
|
EnforcedStyle: normalcase
|
|
2386
2494
|
SupportedStyles:
|
|
2387
2495
|
- snake_case
|
|
2388
2496
|
- normalcase
|
|
2389
2497
|
- non_integer
|
|
2498
|
+
CheckMethodNames: true
|
|
2499
|
+
CheckSymbols: true
|
|
2500
|
+
AllowedIdentifiers:
|
|
2501
|
+
- capture3 # Open3.capture3
|
|
2502
|
+
- iso8601 # Time#iso8601
|
|
2503
|
+
- rfc1123_date # CGI.rfc1123_date
|
|
2504
|
+
- rfc822 # Time#rfc822
|
|
2505
|
+
- rfc2822 # Time#rfc2822
|
|
2506
|
+
- rfc3339 # DateTime.rfc3339
|
|
2390
2507
|
|
|
2391
2508
|
#################### Security ##############################
|
|
2392
2509
|
|
|
@@ -2417,9 +2534,10 @@ Security/MarshalLoad:
|
|
|
2417
2534
|
VersionAdded: '0.47'
|
|
2418
2535
|
|
|
2419
2536
|
Security/Open:
|
|
2420
|
-
Description: 'The use of Kernel#open
|
|
2537
|
+
Description: 'The use of `Kernel#open` and `URI.open` represent a serious security risk.'
|
|
2421
2538
|
Enabled: true
|
|
2422
2539
|
VersionAdded: '0.53'
|
|
2540
|
+
VersionChanged: '1.0'
|
|
2423
2541
|
Safe: false
|
|
2424
2542
|
|
|
2425
2543
|
Security/YAMLLoad:
|
|
@@ -2446,7 +2564,7 @@ Style/AccessModifierDeclarations:
|
|
|
2446
2564
|
|
|
2447
2565
|
Style/AccessorGrouping:
|
|
2448
2566
|
Description: 'Checks for grouping of accessors in `class` and `module` bodies.'
|
|
2449
|
-
Enabled:
|
|
2567
|
+
Enabled: true
|
|
2450
2568
|
VersionAdded: '0.87'
|
|
2451
2569
|
EnforcedStyle: grouped
|
|
2452
2570
|
SupportedStyles:
|
|
@@ -2479,6 +2597,13 @@ Style/AndOr:
|
|
|
2479
2597
|
- always
|
|
2480
2598
|
- conditionals
|
|
2481
2599
|
|
|
2600
|
+
Style/ArgumentsForwarding:
|
|
2601
|
+
Description: 'Use arguments forwarding.'
|
|
2602
|
+
StyleGuide: '#arguments-forwarding'
|
|
2603
|
+
Enabled: pending
|
|
2604
|
+
AllowOnlyRestArgument: true
|
|
2605
|
+
VersionAdded: '1.1'
|
|
2606
|
+
|
|
2482
2607
|
Style/ArrayCoercion:
|
|
2483
2608
|
Description: >-
|
|
2484
2609
|
Use Array() instead of explicit Array check or [*var], when dealing
|
|
@@ -2535,7 +2660,7 @@ Style/BisectedAttrAccessor:
|
|
|
2535
2660
|
Description: >-
|
|
2536
2661
|
Checks for places where `attr_reader` and `attr_writer`
|
|
2537
2662
|
for the same method can be combined into single `attr_accessor`.
|
|
2538
|
-
Enabled:
|
|
2663
|
+
Enabled: true
|
|
2539
2664
|
VersionAdded: '0.87'
|
|
2540
2665
|
|
|
2541
2666
|
Style/BlockComments:
|
|
@@ -2674,7 +2799,7 @@ Style/CaseEquality:
|
|
|
2674
2799
|
Style/CaseLikeIf:
|
|
2675
2800
|
Description: 'This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.'
|
|
2676
2801
|
StyleGuide: '#case-vs-if-else'
|
|
2677
|
-
Enabled:
|
|
2802
|
+
Enabled: true
|
|
2678
2803
|
Safe: false
|
|
2679
2804
|
VersionAdded: '0.88'
|
|
2680
2805
|
|
|
@@ -2727,7 +2852,7 @@ Style/ClassCheck:
|
|
|
2727
2852
|
Style/ClassEqualityComparison:
|
|
2728
2853
|
Description: 'Enforces the use of `Object#instance_of?` instead of class comparison for equality.'
|
|
2729
2854
|
StyleGuide: '#instance-of-vs-class-comparison'
|
|
2730
|
-
Enabled:
|
|
2855
|
+
Enabled: true
|
|
2731
2856
|
VersionAdded: '0.93'
|
|
2732
2857
|
IgnoredMethods:
|
|
2733
2858
|
- ==
|
|
@@ -2757,6 +2882,13 @@ Style/ClassVars:
|
|
|
2757
2882
|
Enabled: true
|
|
2758
2883
|
VersionAdded: '0.13'
|
|
2759
2884
|
|
|
2885
|
+
Style/CollectionCompact:
|
|
2886
|
+
Description: 'Use `{Array,Hash}#{compact,compact!}` instead of custom logic to reject nils.'
|
|
2887
|
+
Enabled: pending
|
|
2888
|
+
Safe: false
|
|
2889
|
+
VersionAdded: '1.2'
|
|
2890
|
+
VersionChanged: '1.3'
|
|
2891
|
+
|
|
2760
2892
|
# Align with the style guide.
|
|
2761
2893
|
Style/CollectionMethods:
|
|
2762
2894
|
Description: 'Preferred collection methods.'
|
|
@@ -2795,7 +2927,7 @@ Style/CombinableLoops:
|
|
|
2795
2927
|
Description: >-
|
|
2796
2928
|
Checks for places where multiple consecutive loops over the same data
|
|
2797
2929
|
can be combined into a single loop.
|
|
2798
|
-
Enabled:
|
|
2930
|
+
Enabled: true
|
|
2799
2931
|
Safe: false
|
|
2800
2932
|
VersionAdded: '0.90'
|
|
2801
2933
|
|
|
@@ -2820,17 +2952,18 @@ Style/CommandLiteral:
|
|
|
2820
2952
|
Style/CommentAnnotation:
|
|
2821
2953
|
Description: >-
|
|
2822
2954
|
Checks formatting of special comments
|
|
2823
|
-
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
|
2955
|
+
(TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE).
|
|
2824
2956
|
StyleGuide: '#annotate-keywords'
|
|
2825
2957
|
Enabled: true
|
|
2826
2958
|
VersionAdded: '0.10'
|
|
2827
|
-
VersionChanged: '
|
|
2959
|
+
VersionChanged: '1.3'
|
|
2828
2960
|
Keywords:
|
|
2829
2961
|
- TODO
|
|
2830
2962
|
- FIXME
|
|
2831
2963
|
- OPTIMIZE
|
|
2832
2964
|
- HACK
|
|
2833
2965
|
- REVIEW
|
|
2966
|
+
- NOTE
|
|
2834
2967
|
|
|
2835
2968
|
Style/CommentedKeyword:
|
|
2836
2969
|
Description: 'Do not place comments on the same line as certain keywords.'
|
|
@@ -2919,6 +3052,15 @@ Style/DisableCopsWithinSourceCodeDirective:
|
|
|
2919
3052
|
Enabled: false
|
|
2920
3053
|
VersionAdded: '0.82'
|
|
2921
3054
|
|
|
3055
|
+
Style/DocumentDynamicEvalDefinition:
|
|
3056
|
+
Description: >-
|
|
3057
|
+
When using `class_eval` (or other `eval`) with string interpolation,
|
|
3058
|
+
add a comment block showing its appearance if interpolated.
|
|
3059
|
+
StyleGuide: '#eval-comment-docs'
|
|
3060
|
+
Enabled: pending
|
|
3061
|
+
VersionAdded: '1.1'
|
|
3062
|
+
VersionChanged: '1.3'
|
|
3063
|
+
|
|
2922
3064
|
Style/Documentation:
|
|
2923
3065
|
Description: 'Document classes and non-namespace modules.'
|
|
2924
3066
|
Enabled: true
|
|
@@ -2946,7 +3088,7 @@ Style/DoubleNegation:
|
|
|
2946
3088
|
StyleGuide: '#no-bang-bang'
|
|
2947
3089
|
Enabled: true
|
|
2948
3090
|
VersionAdded: '0.19'
|
|
2949
|
-
VersionChanged: '
|
|
3091
|
+
VersionChanged: '1.2'
|
|
2950
3092
|
EnforcedStyle: allowed_in_returns
|
|
2951
3093
|
SafeAutoCorrect: false
|
|
2952
3094
|
SupportedStyles:
|
|
@@ -3048,7 +3190,7 @@ Style/ExplicitBlockArgument:
|
|
|
3048
3190
|
Consider using explicit block argument to avoid writing block literal
|
|
3049
3191
|
that just passes its arguments to another block.
|
|
3050
3192
|
StyleGuide: '#block-argument'
|
|
3051
|
-
Enabled:
|
|
3193
|
+
Enabled: true
|
|
3052
3194
|
# May change the yielding arity.
|
|
3053
3195
|
Safe: false
|
|
3054
3196
|
VersionAdded: '0.89'
|
|
@@ -3056,7 +3198,7 @@ Style/ExplicitBlockArgument:
|
|
|
3056
3198
|
Style/ExponentialNotation:
|
|
3057
3199
|
Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
|
|
3058
3200
|
StyleGuide: '#exponential-notation'
|
|
3059
|
-
Enabled:
|
|
3201
|
+
Enabled: true
|
|
3060
3202
|
VersionAdded: '0.82'
|
|
3061
3203
|
EnforcedStyle: scientific
|
|
3062
3204
|
SupportedStyles:
|
|
@@ -3111,8 +3253,12 @@ Style/FormatStringToken:
|
|
|
3111
3253
|
# Prefer simple looking "template" style tokens like `%{name}`, `%{age}`
|
|
3112
3254
|
- template
|
|
3113
3255
|
- unannotated
|
|
3256
|
+
# `MaxUnannotatedPlaceholdersAllowed` defines the number of `unannotated`
|
|
3257
|
+
# style token in a format string to be allowed when enforced style is not
|
|
3258
|
+
# `unannotated`.
|
|
3259
|
+
MaxUnannotatedPlaceholdersAllowed: 1
|
|
3114
3260
|
VersionAdded: '0.49'
|
|
3115
|
-
VersionChanged: '0
|
|
3261
|
+
VersionChanged: '1.0'
|
|
3116
3262
|
|
|
3117
3263
|
Style/FrozenStringLiteralComment:
|
|
3118
3264
|
Description: >-
|
|
@@ -3139,7 +3285,7 @@ Style/FrozenStringLiteralComment:
|
|
|
3139
3285
|
Style/GlobalStdStream:
|
|
3140
3286
|
Description: 'Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.'
|
|
3141
3287
|
StyleGuide: '#global-stdout'
|
|
3142
|
-
Enabled:
|
|
3288
|
+
Enabled: true
|
|
3143
3289
|
VersionAdded: '0.89'
|
|
3144
3290
|
SafeAutoCorrect: false
|
|
3145
3291
|
|
|
@@ -3167,7 +3313,7 @@ Style/HashAsLastArrayItem:
|
|
|
3167
3313
|
Checks for presence or absence of braces around hash literal as a last
|
|
3168
3314
|
array item depending on configuration.
|
|
3169
3315
|
StyleGuide: '#hash-literal-as-last-array-item'
|
|
3170
|
-
Enabled:
|
|
3316
|
+
Enabled: true
|
|
3171
3317
|
VersionAdded: '0.88'
|
|
3172
3318
|
EnforcedStyle: braces
|
|
3173
3319
|
SupportedStyles:
|
|
@@ -3177,7 +3323,7 @@ Style/HashAsLastArrayItem:
|
|
|
3177
3323
|
Style/HashEachMethods:
|
|
3178
3324
|
Description: 'Use Hash#each_key and Hash#each_value.'
|
|
3179
3325
|
StyleGuide: '#hash-each'
|
|
3180
|
-
Enabled:
|
|
3326
|
+
Enabled: true
|
|
3181
3327
|
VersionAdded: '0.80'
|
|
3182
3328
|
Safe: false
|
|
3183
3329
|
|
|
@@ -3185,7 +3331,7 @@ Style/HashLikeCase:
|
|
|
3185
3331
|
Description: >-
|
|
3186
3332
|
Checks for places where `case-when` represents a simple 1:1
|
|
3187
3333
|
mapping and can be replaced with a hash lookup.
|
|
3188
|
-
Enabled:
|
|
3334
|
+
Enabled: true
|
|
3189
3335
|
VersionAdded: '0.88'
|
|
3190
3336
|
# `MinBranchesCount` defines the number of branches `case` needs to have
|
|
3191
3337
|
# to trigger this cop
|
|
@@ -3216,14 +3362,14 @@ Style/HashSyntax:
|
|
|
3216
3362
|
|
|
3217
3363
|
Style/HashTransformKeys:
|
|
3218
3364
|
Description: 'Prefer `transform_keys` over `each_with_object`, `map`, or `to_h`.'
|
|
3219
|
-
Enabled:
|
|
3365
|
+
Enabled: true
|
|
3220
3366
|
VersionAdded: '0.80'
|
|
3221
3367
|
VersionChanged: '0.90'
|
|
3222
3368
|
Safe: false
|
|
3223
3369
|
|
|
3224
3370
|
Style/HashTransformValues:
|
|
3225
3371
|
Description: 'Prefer `transform_values` over `each_with_object`, `map`, or `to_h`.'
|
|
3226
|
-
Enabled:
|
|
3372
|
+
Enabled: true
|
|
3227
3373
|
VersionAdded: '0.80'
|
|
3228
3374
|
VersionChanged: '0.90'
|
|
3229
3375
|
Safe: false
|
|
@@ -3241,6 +3387,7 @@ Style/IfInsideElse:
|
|
|
3241
3387
|
Enabled: true
|
|
3242
3388
|
AllowIfModifier: false
|
|
3243
3389
|
VersionAdded: '0.36'
|
|
3390
|
+
VersionChanged: '1.3'
|
|
3244
3391
|
|
|
3245
3392
|
Style/IfUnlessModifier:
|
|
3246
3393
|
Description: >-
|
|
@@ -3273,12 +3420,14 @@ Style/ImplicitRuntimeError:
|
|
|
3273
3420
|
VersionAdded: '0.41'
|
|
3274
3421
|
|
|
3275
3422
|
Style/InfiniteLoop:
|
|
3276
|
-
Description:
|
|
3423
|
+
Description: >-
|
|
3424
|
+
Use Kernel#loop for infinite loops.
|
|
3425
|
+
This cop is unsafe in the body may raise a `StopIteration` exception.
|
|
3426
|
+
Safe: false
|
|
3277
3427
|
StyleGuide: '#infinite-loop'
|
|
3278
3428
|
Enabled: true
|
|
3279
3429
|
VersionAdded: '0.26'
|
|
3280
3430
|
VersionChanged: '0.61'
|
|
3281
|
-
SafeAutoCorrect: true
|
|
3282
3431
|
|
|
3283
3432
|
Style/InlineComment:
|
|
3284
3433
|
Description: 'Avoid trailing inline comments.'
|
|
@@ -3330,7 +3479,7 @@ Style/IpAddresses:
|
|
|
3330
3479
|
Style/KeywordParametersOrder:
|
|
3331
3480
|
Description: 'Enforces that optional keyword parameters are placed at the end of the parameters list.'
|
|
3332
3481
|
StyleGuide: '#keyword-parameters-order'
|
|
3333
|
-
Enabled:
|
|
3482
|
+
Enabled: true
|
|
3334
3483
|
VersionAdded: '0.90'
|
|
3335
3484
|
|
|
3336
3485
|
Style/Lambda:
|
|
@@ -3532,6 +3681,7 @@ Style/MultipleComparison:
|
|
|
3532
3681
|
use Array#include? instead.
|
|
3533
3682
|
Enabled: true
|
|
3534
3683
|
VersionAdded: '0.49'
|
|
3684
|
+
VersionChanged: '1.1'
|
|
3535
3685
|
|
|
3536
3686
|
Style/MutableConstant:
|
|
3537
3687
|
Description: 'Do not assign mutable objects to constants.'
|
|
@@ -3566,6 +3716,13 @@ Style/NegatedIf:
|
|
|
3566
3716
|
- prefix
|
|
3567
3717
|
- postfix
|
|
3568
3718
|
|
|
3719
|
+
Style/NegatedIfElseCondition:
|
|
3720
|
+
Description: >-
|
|
3721
|
+
This cop checks for uses of `if-else` and ternary operators with a negated condition
|
|
3722
|
+
which can be simplified by inverting condition and swapping branches.
|
|
3723
|
+
Enabled: pending
|
|
3724
|
+
VersionAdded: '1.2'
|
|
3725
|
+
|
|
3569
3726
|
Style/NegatedUnless:
|
|
3570
3727
|
Description: 'Favor if over unless for negative conditions.'
|
|
3571
3728
|
StyleGuide: '#if-for-negatives'
|
|
@@ -3653,6 +3810,11 @@ Style/NilComparison:
|
|
|
3653
3810
|
- predicate
|
|
3654
3811
|
- comparison
|
|
3655
3812
|
|
|
3813
|
+
Style/NilLambda:
|
|
3814
|
+
Description: 'Prefer `-> {}` to `-> { nil }`.'
|
|
3815
|
+
Enabled: pending
|
|
3816
|
+
VersionAdded: '1.3'
|
|
3817
|
+
|
|
3656
3818
|
Style/NonNilCheck:
|
|
3657
3819
|
Description: 'Checks for redundant nil checks.'
|
|
3658
3820
|
StyleGuide: '#no-non-nil-checks'
|
|
@@ -3755,7 +3917,7 @@ Style/OptionalArguments:
|
|
|
3755
3917
|
Style/OptionalBooleanParameter:
|
|
3756
3918
|
Description: 'Use keyword arguments when defining method with boolean argument.'
|
|
3757
3919
|
StyleGuide: '#boolean-keyword-arguments'
|
|
3758
|
-
Enabled:
|
|
3920
|
+
Enabled: true
|
|
3759
3921
|
Safe: false
|
|
3760
3922
|
VersionAdded: '0.89'
|
|
3761
3923
|
AllowedMethods:
|
|
@@ -3802,7 +3964,7 @@ Style/PercentLiteralDelimiters:
|
|
|
3802
3964
|
'%r': '{}'
|
|
3803
3965
|
'%w': '[]'
|
|
3804
3966
|
'%W': '[]'
|
|
3805
|
-
VersionChanged: '0.48
|
|
3967
|
+
VersionChanged: '0.48'
|
|
3806
3968
|
|
|
3807
3969
|
Style/PercentQLiterals:
|
|
3808
3970
|
Description: 'Checks if uses of %Q/%q match the configured preference.'
|
|
@@ -3843,11 +4005,12 @@ Style/RaiseArgs:
|
|
|
3843
4005
|
StyleGuide: '#exception-class-messages'
|
|
3844
4006
|
Enabled: true
|
|
3845
4007
|
VersionAdded: '0.14'
|
|
3846
|
-
VersionChanged: '
|
|
4008
|
+
VersionChanged: '1.2'
|
|
3847
4009
|
EnforcedStyle: exploded
|
|
3848
4010
|
SupportedStyles:
|
|
3849
4011
|
- compact # raise Exception.new(msg)
|
|
3850
4012
|
- exploded # raise Exception, msg
|
|
4013
|
+
AllowedCompactTypes: []
|
|
3851
4014
|
|
|
3852
4015
|
Style/RandomWithOffset:
|
|
3853
4016
|
Description: >-
|
|
@@ -3857,9 +4020,20 @@ Style/RandomWithOffset:
|
|
|
3857
4020
|
Enabled: true
|
|
3858
4021
|
VersionAdded: '0.52'
|
|
3859
4022
|
|
|
4023
|
+
Style/RedundantArgument:
|
|
4024
|
+
Description: 'Check for a redundant argument passed to certain methods.'
|
|
4025
|
+
Enabled: pending
|
|
4026
|
+
Safe: false
|
|
4027
|
+
VersionAdded: '1.4'
|
|
4028
|
+
Methods:
|
|
4029
|
+
# Array#join
|
|
4030
|
+
join: ''
|
|
4031
|
+
# String#split
|
|
4032
|
+
split: ' '
|
|
4033
|
+
|
|
3860
4034
|
Style/RedundantAssignment:
|
|
3861
4035
|
Description: 'Checks for redundant assignment before returning.'
|
|
3862
|
-
Enabled:
|
|
4036
|
+
Enabled: true
|
|
3863
4037
|
VersionAdded: '0.87'
|
|
3864
4038
|
|
|
3865
4039
|
Style/RedundantBegin:
|
|
@@ -3896,7 +4070,7 @@ Style/RedundantFetchBlock:
|
|
|
3896
4070
|
Use `fetch(key, value)` instead of `fetch(key) { value }`
|
|
3897
4071
|
when value has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or is a constant.
|
|
3898
4072
|
Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashfetch-with-argument-vs-hashfetch--block-code'
|
|
3899
|
-
Enabled:
|
|
4073
|
+
Enabled: true
|
|
3900
4074
|
Safe: false
|
|
3901
4075
|
# If enabled, this cop will autocorrect usages of
|
|
3902
4076
|
# `fetch` being called with block returning a constant.
|
|
@@ -3909,7 +4083,7 @@ Style/RedundantFileExtensionInRequire:
|
|
|
3909
4083
|
Checks for the presence of superfluous `.rb` extension in
|
|
3910
4084
|
the filename provided to `require` and `require_relative`.
|
|
3911
4085
|
StyleGuide: '#no-explicit-rb-to-require'
|
|
3912
|
-
Enabled:
|
|
4086
|
+
Enabled: true
|
|
3913
4087
|
VersionAdded: '0.88'
|
|
3914
4088
|
|
|
3915
4089
|
Style/RedundantFreeze:
|
|
@@ -3936,12 +4110,12 @@ Style/RedundantPercentQ:
|
|
|
3936
4110
|
|
|
3937
4111
|
Style/RedundantRegexpCharacterClass:
|
|
3938
4112
|
Description: 'Checks for unnecessary single-element Regexp character classes.'
|
|
3939
|
-
Enabled:
|
|
4113
|
+
Enabled: true
|
|
3940
4114
|
VersionAdded: '0.85'
|
|
3941
4115
|
|
|
3942
4116
|
Style/RedundantRegexpEscape:
|
|
3943
4117
|
Description: 'Checks for redundant escapes in Regexps.'
|
|
3944
|
-
Enabled:
|
|
4118
|
+
Enabled: true
|
|
3945
4119
|
VersionAdded: '0.85'
|
|
3946
4120
|
|
|
3947
4121
|
Style/RedundantReturn:
|
|
@@ -3962,7 +4136,7 @@ Style/RedundantSelf:
|
|
|
3962
4136
|
|
|
3963
4137
|
Style/RedundantSelfAssignment:
|
|
3964
4138
|
Description: 'Checks for places where redundant assignments are made for in place modification methods.'
|
|
3965
|
-
Enabled:
|
|
4139
|
+
Enabled: true
|
|
3966
4140
|
Safe: false
|
|
3967
4141
|
VersionAdded: '0.90'
|
|
3968
4142
|
|
|
@@ -4090,7 +4264,7 @@ Style/SignalException:
|
|
|
4090
4264
|
|
|
4091
4265
|
Style/SingleArgumentDig:
|
|
4092
4266
|
Description: 'Avoid using single argument dig method.'
|
|
4093
|
-
Enabled:
|
|
4267
|
+
Enabled: true
|
|
4094
4268
|
VersionAdded: '0.89'
|
|
4095
4269
|
Safe: false
|
|
4096
4270
|
|
|
@@ -4117,7 +4291,7 @@ Style/SingleLineMethods:
|
|
|
4117
4291
|
|
|
4118
4292
|
Style/SlicingWithRange:
|
|
4119
4293
|
Description: 'Checks array slicing is done with endless ranges when suitable.'
|
|
4120
|
-
Enabled:
|
|
4294
|
+
Enabled: true
|
|
4121
4295
|
VersionAdded: '0.83'
|
|
4122
4296
|
Safe: false
|
|
4123
4297
|
|
|
@@ -4125,8 +4299,9 @@ Style/SoleNestedConditional:
|
|
|
4125
4299
|
Description: >-
|
|
4126
4300
|
Finds sole nested conditional nodes
|
|
4127
4301
|
which can be merged into outer conditional node.
|
|
4128
|
-
Enabled:
|
|
4302
|
+
Enabled: true
|
|
4129
4303
|
VersionAdded: '0.89'
|
|
4304
|
+
VersionChanged: '1.5'
|
|
4130
4305
|
AllowModifier: false
|
|
4131
4306
|
|
|
4132
4307
|
Style/SpecialGlobalVars:
|
|
@@ -4151,6 +4326,13 @@ Style/StabbyLambdaParentheses:
|
|
|
4151
4326
|
- require_parentheses
|
|
4152
4327
|
- require_no_parentheses
|
|
4153
4328
|
|
|
4329
|
+
Style/StaticClass:
|
|
4330
|
+
Description: 'Prefer modules to classes with only class methods.'
|
|
4331
|
+
StyleGuide: '#modules-vs-classes'
|
|
4332
|
+
Enabled: false
|
|
4333
|
+
Safe: false
|
|
4334
|
+
VersionAdded: '1.3'
|
|
4335
|
+
|
|
4154
4336
|
Style/StderrPuts:
|
|
4155
4337
|
Description: 'Use `warn` instead of `$stderr.puts`.'
|
|
4156
4338
|
StyleGuide: '#warn'
|
|
@@ -4160,7 +4342,7 @@ Style/StderrPuts:
|
|
|
4160
4342
|
Style/StringConcatenation:
|
|
4161
4343
|
Description: 'Checks for places where string concatenation can be replaced with string interpolation.'
|
|
4162
4344
|
StyleGuide: '#string-interpolation'
|
|
4163
|
-
Enabled:
|
|
4345
|
+
Enabled: true
|
|
4164
4346
|
Safe: false
|
|
4165
4347
|
VersionAdded: '0.89'
|
|
4166
4348
|
|
|
@@ -4201,7 +4383,7 @@ Style/StringMethods:
|
|
|
4201
4383
|
Description: 'Checks if configured preferred methods are used over non-preferred.'
|
|
4202
4384
|
Enabled: false
|
|
4203
4385
|
VersionAdded: '0.34'
|
|
4204
|
-
VersionChanged: '0.34
|
|
4386
|
+
VersionChanged: '0.34'
|
|
4205
4387
|
# Mapping from undesired method to desired_method
|
|
4206
4388
|
# e.g. to use `to_sym` over `intern`:
|
|
4207
4389
|
#
|
|
@@ -4223,6 +4405,13 @@ Style/StructInheritance:
|
|
|
4223
4405
|
VersionAdded: '0.29'
|
|
4224
4406
|
VersionChanged: '0.86'
|
|
4225
4407
|
|
|
4408
|
+
Style/SwapValues:
|
|
4409
|
+
Description: 'This cop enforces the use of shorthand-style swapping of 2 variables.'
|
|
4410
|
+
StyleGuide: '#values-swapping'
|
|
4411
|
+
Enabled: pending
|
|
4412
|
+
VersionAdded: '1.1'
|
|
4413
|
+
SafeAutoCorrect: false
|
|
4414
|
+
|
|
4226
4415
|
Style/SymbolArray:
|
|
4227
4416
|
Description: 'Use %i or %I for arrays of symbols.'
|
|
4228
4417
|
StyleGuide: '#percent-i'
|
|
@@ -4245,7 +4434,7 @@ Style/SymbolProc:
|
|
|
4245
4434
|
Enabled: true
|
|
4246
4435
|
Safe: false
|
|
4247
4436
|
VersionAdded: '0.26'
|
|
4248
|
-
VersionChanged: '
|
|
4437
|
+
VersionChanged: '1.5'
|
|
4249
4438
|
# A list of method names to be ignored by the check.
|
|
4250
4439
|
# The names should be fairly unique, otherwise you'll end up ignoring lots of code.
|
|
4251
4440
|
IgnoredMethods:
|
data/lib/chefstyle/version.rb
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
module RuboCop
|
|
20
20
|
module Cop
|
|
21
21
|
module Chef
|
|
22
|
-
module
|
|
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
|
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
|
+
version: 1.5.6
|
|
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-12-01 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:
|
|
19
|
+
version: 1.5.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:
|
|
26
|
+
version: 1.5.0
|
|
27
27
|
description:
|
|
28
28
|
email:
|
|
29
29
|
- oss@chef.io
|