chefstyle 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd3f70cecc57964cb2e1d13845d9b020e6da508410a64325ad3dc0c0cb7fc9b7
4
- data.tar.gz: 60d116b3d374493b84677536b88ac56d4b8641ff8069f488652f4dd04ed57b94
3
+ metadata.gz: 9bd6b5ab8e9f76500ae01a2f2bef633534cb5f3e92567c0eca54627743f1f121
4
+ data.tar.gz: 6870c8ef17247f5eb13683a6f0036cc496950018c375321b94c538d6d4c5308e
5
5
  SHA512:
6
- metadata.gz: 91ef2dc22fd2c69609cb95d322291aadcdd64053851b6a30e01b18706a62a90faeb1142fb3909b26bc119d4b27ca7001591ad5f42c80c3b1c8e5dbeb6ffce750
7
- data.tar.gz: 6d163c53de2058f45ff13d1dffc9430e1f70d885404f2d63e30e4ee816c8743294e80878ebc628eef5c70529a88efe58604f06186f0c57a636a6b65023bafc2e
6
+ metadata.gz: 10de957e5aa133094336624705910075a9a8d19020c7a5943b1573047b8261213c80cf95ca9afc3d78576fdb70cffcdff37c02434379eb21e81ba580f7a64704
7
+ data.tar.gz: c35d511fc1dae3b3ffce5a3138686d483dd00bca254d506a88879ee1b3e600dddb5b5bd4717891167eb08da296c0aa2612061e93a5b710cb7c50b018980b3553
@@ -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:
@@ -249,6 +251,8 @@ Lint/ElseLayout:
249
251
  Enabled: false
250
252
  Lint/EmptyBlock:
251
253
  Enabled: false
254
+ Lint/EmptyClass:
255
+ Enabled: false
252
256
  Lint/EmptyConditionalBody:
253
257
  Enabled: false
254
258
  Lint/EmptyEnsure:
@@ -657,6 +661,8 @@ Style/RedundantSelfAssignment:
657
661
  Enabled: false
658
662
  Style/SoleNestedConditional:
659
663
  Enabled: false
664
+ Style/StaticClass:
665
+ Enabled: false
660
666
  Style/MethodCalledOnDoEndBlock:
661
667
  Enabled: false
662
668
  Style/MethodDefParentheses:
@@ -709,6 +715,8 @@ Style/Next:
709
715
  Enabled: false
710
716
  Style/NilComparison:
711
717
  Enabled: false
718
+ Style/NilLambda:
719
+ Enabled: false
712
720
  Style/NonNilCheck:
713
721
  Enabled: false
714
722
  Style/Not:
@@ -891,7 +891,7 @@ Layout/LineLength:
891
891
  StyleGuide: '#max-line-length'
892
892
  Enabled: true
893
893
  VersionAdded: '0.25'
894
- VersionChanged: '0.84'
894
+ VersionChanged: '1.3'
895
895
  AutoCorrect: false
896
896
  Max: 120
897
897
  # To make it possible to copy or click on URIs in the code, we allow lines
@@ -1400,6 +1400,8 @@ Lint/ConstantDefinitionInBlock:
1400
1400
  StyleGuide: '#no-constant-definition-in-block'
1401
1401
  Enabled: true
1402
1402
  VersionAdded: '0.91'
1403
+ VersionChanged: '1.3'
1404
+ AllowedMethods: []
1403
1405
 
1404
1406
  Lint/ConstantResolution:
1405
1407
  Description: 'Check that constants are fully qualified with `::`.'
@@ -1415,6 +1417,22 @@ Lint/Debugger:
1415
1417
  Enabled: true
1416
1418
  VersionAdded: '0.14'
1417
1419
  VersionChanged: '0.49'
1420
+ DebuggerReceivers:
1421
+ - binding
1422
+ - Kernel
1423
+ - Pry
1424
+ DebuggerMethods:
1425
+ - debugger
1426
+ - byebug
1427
+ - remote_byebug
1428
+ - pry
1429
+ - remote_pry
1430
+ - pry_remote
1431
+ - console
1432
+ - rescue
1433
+ - save_and_open_page
1434
+ - save_and_open_screenshot
1435
+ - irb
1418
1436
 
1419
1437
  Lint/DeprecatedClassMethods:
1420
1438
  Description: 'Check for deprecated class method calls.'
@@ -1433,6 +1451,11 @@ Lint/DisjunctiveAssignmentInConstructor:
1433
1451
  VersionAdded: '0.62'
1434
1452
  VersionChanged: '0.88'
1435
1453
 
1454
+ Lint/DuplicateBranch:
1455
+ Description: Checks that there are no repeated bodies within `if/unless`, `case-when` and `rescue` constructs.
1456
+ Enabled: pending
1457
+ VersionAdded: '1.3'
1458
+
1436
1459
  Lint/DuplicateCaseCondition:
1437
1460
  Description: 'Do not repeat values in case conditionals.'
1438
1461
  Enabled: true
@@ -1484,7 +1507,15 @@ Lint/EmptyBlock:
1484
1507
  Description: 'This cop checks for blocks without a body.'
1485
1508
  Enabled: pending
1486
1509
  VersionAdded: '1.1'
1510
+ VersionChanged: '1.3'
1487
1511
  AllowComments: true
1512
+ AllowEmptyLambdas: true
1513
+
1514
+ Lint/EmptyClass:
1515
+ Description: 'Checks for classes and metaclasses without a body.'
1516
+ Enabled: pending
1517
+ VersionAdded: '1.3'
1518
+ AllowComments: false
1488
1519
 
1489
1520
  Lint/EmptyConditionalBody:
1490
1521
  Description: 'This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.'
@@ -1628,7 +1659,8 @@ Lint/Loop:
1628
1659
  StyleGuide: '#loop-with-break'
1629
1660
  Enabled: true
1630
1661
  VersionAdded: '0.9'
1631
- VersionChanged: '0.89'
1662
+ VersionChanged: '1.3'
1663
+ Safe: false
1632
1664
 
1633
1665
  Lint/MissingCopEnableDirective:
1634
1666
  Description: 'Checks for a `# rubocop:enable` after `# rubocop:disable`.'
@@ -2416,7 +2448,7 @@ Naming/VariableNumber:
2416
2448
  StyleGuide: '#snake-case-symbols-methods-vars-with-numbers'
2417
2449
  Enabled: true
2418
2450
  VersionAdded: '0.50'
2419
- VersionChanged: '1.2'
2451
+ VersionChanged: '1.3'
2420
2452
  EnforcedStyle: normalcase
2421
2453
  SupportedStyles:
2422
2454
  - snake_case
@@ -2424,6 +2456,7 @@ Naming/VariableNumber:
2424
2456
  - non_integer
2425
2457
  CheckMethodNames: true
2426
2458
  CheckSymbols: true
2459
+ AllowedIdentifiers: []
2427
2460
 
2428
2461
  #################### Security ##############################
2429
2462
 
@@ -2805,7 +2838,9 @@ Style/ClassVars:
2805
2838
  Style/CollectionCompact:
2806
2839
  Description: 'Use `{Array,Hash}#{compact,compact!}` instead of custom logic to reject nils.'
2807
2840
  Enabled: pending
2841
+ Safe: false
2808
2842
  VersionAdded: '1.2'
2843
+ VersionChanged: '1.3'
2809
2844
 
2810
2845
  # Align with the style guide.
2811
2846
  Style/CollectionMethods:
@@ -2870,17 +2905,18 @@ Style/CommandLiteral:
2870
2905
  Style/CommentAnnotation:
2871
2906
  Description: >-
2872
2907
  Checks formatting of special comments
2873
- (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
2908
+ (TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE).
2874
2909
  StyleGuide: '#annotate-keywords'
2875
2910
  Enabled: true
2876
2911
  VersionAdded: '0.10'
2877
- VersionChanged: '0.31'
2912
+ VersionChanged: '1.3'
2878
2913
  Keywords:
2879
2914
  - TODO
2880
2915
  - FIXME
2881
2916
  - OPTIMIZE
2882
2917
  - HACK
2883
2918
  - REVIEW
2919
+ - NOTE
2884
2920
 
2885
2921
  Style/CommentedKeyword:
2886
2922
  Description: 'Do not place comments on the same line as certain keywords.'
@@ -2976,6 +3012,7 @@ Style/DocumentDynamicEvalDefinition:
2976
3012
  StyleGuide: '#eval-comment-docs'
2977
3013
  Enabled: pending
2978
3014
  VersionAdded: '1.1'
3015
+ VersionChanged: '1.3'
2979
3016
 
2980
3017
  Style/Documentation:
2981
3018
  Description: 'Document classes and non-namespace modules.'
@@ -3303,6 +3340,7 @@ Style/IfInsideElse:
3303
3340
  Enabled: true
3304
3341
  AllowIfModifier: false
3305
3342
  VersionAdded: '0.36'
3343
+ VersionChanged: '1.3'
3306
3344
 
3307
3345
  Style/IfUnlessModifier:
3308
3346
  Description: >-
@@ -3335,12 +3373,14 @@ Style/ImplicitRuntimeError:
3335
3373
  VersionAdded: '0.41'
3336
3374
 
3337
3375
  Style/InfiniteLoop:
3338
- Description: 'Use Kernel#loop for infinite loops.'
3376
+ Description: >-
3377
+ Use Kernel#loop for infinite loops.
3378
+ This cop is unsafe in the body may raise a `StopIteration` exception.
3379
+ Safe: false
3339
3380
  StyleGuide: '#infinite-loop'
3340
3381
  Enabled: true
3341
3382
  VersionAdded: '0.26'
3342
3383
  VersionChanged: '0.61'
3343
- SafeAutoCorrect: true
3344
3384
 
3345
3385
  Style/InlineComment:
3346
3386
  Description: 'Avoid trailing inline comments.'
@@ -3723,6 +3763,11 @@ Style/NilComparison:
3723
3763
  - predicate
3724
3764
  - comparison
3725
3765
 
3766
+ Style/NilLambda:
3767
+ Description: 'Prefer `-> {}` to `-> { nil }`.'
3768
+ Enabled: pending
3769
+ VersionAdded: '1.3'
3770
+
3726
3771
  Style/NonNilCheck:
3727
3772
  Description: 'Checks for redundant nil checks.'
3728
3773
  StyleGuide: '#no-non-nil-checks'
@@ -4222,6 +4267,13 @@ Style/StabbyLambdaParentheses:
4222
4267
  - require_parentheses
4223
4268
  - require_no_parentheses
4224
4269
 
4270
+ Style/StaticClass:
4271
+ Description: 'Prefer modules to classes with only class methods.'
4272
+ StyleGuide: '#modules-vs-classes'
4273
+ Enabled: false
4274
+ Safe: false
4275
+ VersionAdded: '1.3'
4276
+
4225
4277
  Style/StderrPuts:
4226
4278
  Description: 'Use `warn` instead of `$stderr.puts`.'
4227
4279
  StyleGuide: '#warn'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Chefstyle
3
- VERSION = "1.5.0"
4
- RUBOCOP_VERSION = "1.2.0"
3
+ VERSION = "1.5.1"
4
+ RUBOCOP_VERSION = "1.3.0"
5
5
  end
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.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-05 00:00:00.000000000 Z
11
+ date: 2020-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.0
19
+ version: 1.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.2.0
26
+ version: 1.3.0
27
27
  description:
28
28
  email:
29
29
  - oss@chef.io