cookstyle 7.1.2 → 7.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/config/cookstyle.yml +7 -7
- data/config/disable_all.yml +8 -0
- data/config/upstream.yml +66 -11
- data/lib/cookstyle/version.rb +2 -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: 8088b6d9be87be39e75eb71adcaf0ce5d1470f2fc560313d33a023b46de609f4
|
4
|
+
data.tar.gz: d62c2c523a653133a5926ada9ec9bfcee1fc17bb9f37bc1095e140f4bf106c38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dfdc60f0577fd7d2e9445e321f8412a0b8711a9f6b4e0ac8611d98519f809df02d2d4c1614e56dc613eb271230a754b5fef5eb4d61a8265090183d803dcda68
|
7
|
+
data.tar.gz: 628882e2d671e86016e303782139fbf7b3cc8f1715e73f1228fcb6d5eb15dcb19319e3f556533d7a048d2bb613bdcc2cc55d01aa52e45ef70c32548e53bbbfad
|
data/Gemfile
CHANGED
data/config/cookstyle.yml
CHANGED
@@ -11,7 +11,7 @@ AllCops:
|
|
11
11
|
###############################
|
12
12
|
|
13
13
|
Chef/Style:
|
14
|
-
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/
|
14
|
+
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chef_style.md
|
15
15
|
|
16
16
|
Chef/Style/AttributeKeys:
|
17
17
|
Description: Check which style of keys are used to access node attributes.
|
@@ -155,7 +155,7 @@ Chef/Style/IncludeRecipeWithParentheses:
|
|
155
155
|
###############################
|
156
156
|
|
157
157
|
Chef/Correctness:
|
158
|
-
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/
|
158
|
+
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chef_correctness.md
|
159
159
|
|
160
160
|
Chef/Correctness/ServiceResource:
|
161
161
|
Description: Use a service resource to start and stop services instead of execute resources
|
@@ -484,7 +484,7 @@ Chef/Correctness/OctalModeAsString:
|
|
484
484
|
###############################
|
485
485
|
|
486
486
|
Chef/Sharing:
|
487
|
-
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/
|
487
|
+
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chef_sharing.md
|
488
488
|
|
489
489
|
Chef/Sharing/InsecureCookbookURL:
|
490
490
|
Description: Insecure http Github or Gitlab URLs for metadata source_url/issues_url fields
|
@@ -552,7 +552,7 @@ Chef/Sharing/IncludeResourceExamples:
|
|
552
552
|
###############################
|
553
553
|
|
554
554
|
Chef/Deprecations:
|
555
|
-
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/
|
555
|
+
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chef_deprecations.md
|
556
556
|
|
557
557
|
Chef/Deprecations/NodeDeepFetch:
|
558
558
|
Description: Do not use the deprecated chef-sugar node.deep_fetch methods
|
@@ -1159,7 +1159,7 @@ Chef/Deprecations/FoodcriticTesting:
|
|
1159
1159
|
###############################
|
1160
1160
|
|
1161
1161
|
Chef/Modernize:
|
1162
|
-
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/
|
1162
|
+
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chef_modernize.md
|
1163
1163
|
|
1164
1164
|
Chef/Modernize/LegacyBerksfileSource:
|
1165
1165
|
Description: Do not use legacy Berksfile community sources. Use Chef Supermarket instead.
|
@@ -1721,7 +1721,7 @@ Chef/Modernize/ActionMethodInResource:
|
|
1721
1721
|
###############################
|
1722
1722
|
|
1723
1723
|
Chef/RedundantCode:
|
1724
|
-
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/
|
1724
|
+
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chef_redundantcode.md
|
1725
1725
|
|
1726
1726
|
Chef/RedundantCode/ConflictsMetadata:
|
1727
1727
|
Description: Don't use the deprecated 'conflicts' metadata value
|
@@ -1943,7 +1943,7 @@ Chef/RedundantCode/DoubleCompileTime:
|
|
1943
1943
|
###############################
|
1944
1944
|
|
1945
1945
|
Chef/Effortless:
|
1946
|
-
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/
|
1946
|
+
StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chef_effortless.md
|
1947
1947
|
|
1948
1948
|
Chef/Effortless/CookbookUsesSearch:
|
1949
1949
|
Description: Cookbook uses search, which cannot be used in the Effortless Infra pattern
|
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:
|
@@ -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:
|
data/config/upstream.yml
CHANGED
@@ -891,7 +891,7 @@ Layout/LineLength:
|
|
891
891
|
StyleGuide: '#max-line-length'
|
892
892
|
Enabled: true
|
893
893
|
VersionAdded: '0.25'
|
894
|
-
VersionChanged: '
|
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
|
@@ -1176,7 +1176,7 @@ Layout/SpaceBeforeBlockBraces:
|
|
1176
1176
|
SupportedStylesForEmptyBraces:
|
1177
1177
|
- space
|
1178
1178
|
- no_space
|
1179
|
-
VersionChanged: '0.52
|
1179
|
+
VersionChanged: '0.52'
|
1180
1180
|
|
1181
1181
|
Layout/SpaceBeforeComma:
|
1182
1182
|
Description: 'No spaces before commas.'
|
@@ -1400,6 +1400,11 @@ Lint/ConstantDefinitionInBlock:
|
|
1400
1400
|
StyleGuide: '#no-constant-definition-in-block'
|
1401
1401
|
Enabled: true
|
1402
1402
|
VersionAdded: '0.91'
|
1403
|
+
VersionChanged: '1.3'
|
1404
|
+
# `enums` for Typed Enums via T::Enum in Sorbet.
|
1405
|
+
# https://sorbet.org/docs/tenum
|
1406
|
+
AllowedMethods:
|
1407
|
+
- enums
|
1403
1408
|
|
1404
1409
|
Lint/ConstantResolution:
|
1405
1410
|
Description: 'Check that constants are fully qualified with `::`.'
|
@@ -1415,6 +1420,22 @@ Lint/Debugger:
|
|
1415
1420
|
Enabled: true
|
1416
1421
|
VersionAdded: '0.14'
|
1417
1422
|
VersionChanged: '0.49'
|
1423
|
+
DebuggerReceivers:
|
1424
|
+
- binding
|
1425
|
+
- Kernel
|
1426
|
+
- Pry
|
1427
|
+
DebuggerMethods:
|
1428
|
+
- debugger
|
1429
|
+
- byebug
|
1430
|
+
- remote_byebug
|
1431
|
+
- pry
|
1432
|
+
- remote_pry
|
1433
|
+
- pry_remote
|
1434
|
+
- console
|
1435
|
+
- rescue
|
1436
|
+
- save_and_open_page
|
1437
|
+
- save_and_open_screenshot
|
1438
|
+
- irb
|
1418
1439
|
|
1419
1440
|
Lint/DeprecatedClassMethods:
|
1420
1441
|
Description: 'Check for deprecated class method calls.'
|
@@ -1433,6 +1454,11 @@ Lint/DisjunctiveAssignmentInConstructor:
|
|
1433
1454
|
VersionAdded: '0.62'
|
1434
1455
|
VersionChanged: '0.88'
|
1435
1456
|
|
1457
|
+
Lint/DuplicateBranch:
|
1458
|
+
Description: Checks that there are no repeated bodies within `if/unless`, `case-when` and `rescue` constructs.
|
1459
|
+
Enabled: pending
|
1460
|
+
VersionAdded: '1.3'
|
1461
|
+
|
1436
1462
|
Lint/DuplicateCaseCondition:
|
1437
1463
|
Description: 'Do not repeat values in case conditionals.'
|
1438
1464
|
Enabled: true
|
@@ -1484,7 +1510,15 @@ Lint/EmptyBlock:
|
|
1484
1510
|
Description: 'This cop checks for blocks without a body.'
|
1485
1511
|
Enabled: pending
|
1486
1512
|
VersionAdded: '1.1'
|
1513
|
+
VersionChanged: '1.3'
|
1487
1514
|
AllowComments: true
|
1515
|
+
AllowEmptyLambdas: true
|
1516
|
+
|
1517
|
+
Lint/EmptyClass:
|
1518
|
+
Description: 'Checks for classes and metaclasses without a body.'
|
1519
|
+
Enabled: pending
|
1520
|
+
VersionAdded: '1.3'
|
1521
|
+
AllowComments: false
|
1488
1522
|
|
1489
1523
|
Lint/EmptyConditionalBody:
|
1490
1524
|
Description: 'This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.'
|
@@ -1628,7 +1662,8 @@ Lint/Loop:
|
|
1628
1662
|
StyleGuide: '#loop-with-break'
|
1629
1663
|
Enabled: true
|
1630
1664
|
VersionAdded: '0.9'
|
1631
|
-
VersionChanged: '
|
1665
|
+
VersionChanged: '1.3'
|
1666
|
+
Safe: false
|
1632
1667
|
|
1633
1668
|
Lint/MissingCopEnableDirective:
|
1634
1669
|
Description: 'Checks for a `# rubocop:enable` after `# rubocop:disable`.'
|
@@ -1830,7 +1865,7 @@ Lint/RescueException:
|
|
1830
1865
|
StyleGuide: '#no-blind-rescues'
|
1831
1866
|
Enabled: true
|
1832
1867
|
VersionAdded: '0.9'
|
1833
|
-
VersionChanged: '0.27
|
1868
|
+
VersionChanged: '0.27'
|
1834
1869
|
|
1835
1870
|
Lint/RescueType:
|
1836
1871
|
Description: 'Avoid rescuing from non constants that could result in a `TypeError`.'
|
@@ -2416,7 +2451,7 @@ Naming/VariableNumber:
|
|
2416
2451
|
StyleGuide: '#snake-case-symbols-methods-vars-with-numbers'
|
2417
2452
|
Enabled: true
|
2418
2453
|
VersionAdded: '0.50'
|
2419
|
-
VersionChanged: '1.
|
2454
|
+
VersionChanged: '1.3'
|
2420
2455
|
EnforcedStyle: normalcase
|
2421
2456
|
SupportedStyles:
|
2422
2457
|
- snake_case
|
@@ -2424,6 +2459,7 @@ Naming/VariableNumber:
|
|
2424
2459
|
- non_integer
|
2425
2460
|
CheckMethodNames: true
|
2426
2461
|
CheckSymbols: true
|
2462
|
+
AllowedIdentifiers: []
|
2427
2463
|
|
2428
2464
|
#################### Security ##############################
|
2429
2465
|
|
@@ -2805,7 +2841,9 @@ Style/ClassVars:
|
|
2805
2841
|
Style/CollectionCompact:
|
2806
2842
|
Description: 'Use `{Array,Hash}#{compact,compact!}` instead of custom logic to reject nils.'
|
2807
2843
|
Enabled: pending
|
2844
|
+
Safe: false
|
2808
2845
|
VersionAdded: '1.2'
|
2846
|
+
VersionChanged: '1.3'
|
2809
2847
|
|
2810
2848
|
# Align with the style guide.
|
2811
2849
|
Style/CollectionMethods:
|
@@ -2870,17 +2908,18 @@ Style/CommandLiteral:
|
|
2870
2908
|
Style/CommentAnnotation:
|
2871
2909
|
Description: >-
|
2872
2910
|
Checks formatting of special comments
|
2873
|
-
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
2911
|
+
(TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE).
|
2874
2912
|
StyleGuide: '#annotate-keywords'
|
2875
2913
|
Enabled: true
|
2876
2914
|
VersionAdded: '0.10'
|
2877
|
-
VersionChanged: '
|
2915
|
+
VersionChanged: '1.3'
|
2878
2916
|
Keywords:
|
2879
2917
|
- TODO
|
2880
2918
|
- FIXME
|
2881
2919
|
- OPTIMIZE
|
2882
2920
|
- HACK
|
2883
2921
|
- REVIEW
|
2922
|
+
- NOTE
|
2884
2923
|
|
2885
2924
|
Style/CommentedKeyword:
|
2886
2925
|
Description: 'Do not place comments on the same line as certain keywords.'
|
@@ -2976,6 +3015,7 @@ Style/DocumentDynamicEvalDefinition:
|
|
2976
3015
|
StyleGuide: '#eval-comment-docs'
|
2977
3016
|
Enabled: pending
|
2978
3017
|
VersionAdded: '1.1'
|
3018
|
+
VersionChanged: '1.3'
|
2979
3019
|
|
2980
3020
|
Style/Documentation:
|
2981
3021
|
Description: 'Document classes and non-namespace modules.'
|
@@ -3303,6 +3343,7 @@ Style/IfInsideElse:
|
|
3303
3343
|
Enabled: true
|
3304
3344
|
AllowIfModifier: false
|
3305
3345
|
VersionAdded: '0.36'
|
3346
|
+
VersionChanged: '1.3'
|
3306
3347
|
|
3307
3348
|
Style/IfUnlessModifier:
|
3308
3349
|
Description: >-
|
@@ -3335,12 +3376,14 @@ Style/ImplicitRuntimeError:
|
|
3335
3376
|
VersionAdded: '0.41'
|
3336
3377
|
|
3337
3378
|
Style/InfiniteLoop:
|
3338
|
-
Description:
|
3379
|
+
Description: >-
|
3380
|
+
Use Kernel#loop for infinite loops.
|
3381
|
+
This cop is unsafe in the body may raise a `StopIteration` exception.
|
3382
|
+
Safe: false
|
3339
3383
|
StyleGuide: '#infinite-loop'
|
3340
3384
|
Enabled: true
|
3341
3385
|
VersionAdded: '0.26'
|
3342
3386
|
VersionChanged: '0.61'
|
3343
|
-
SafeAutoCorrect: true
|
3344
3387
|
|
3345
3388
|
Style/InlineComment:
|
3346
3389
|
Description: 'Avoid trailing inline comments.'
|
@@ -3723,6 +3766,11 @@ Style/NilComparison:
|
|
3723
3766
|
- predicate
|
3724
3767
|
- comparison
|
3725
3768
|
|
3769
|
+
Style/NilLambda:
|
3770
|
+
Description: 'Prefer `-> {}` to `-> { nil }`.'
|
3771
|
+
Enabled: pending
|
3772
|
+
VersionAdded: '1.3'
|
3773
|
+
|
3726
3774
|
Style/NonNilCheck:
|
3727
3775
|
Description: 'Checks for redundant nil checks.'
|
3728
3776
|
StyleGuide: '#no-non-nil-checks'
|
@@ -3872,7 +3920,7 @@ Style/PercentLiteralDelimiters:
|
|
3872
3920
|
'%r': '{}'
|
3873
3921
|
'%w': '[]'
|
3874
3922
|
'%W': '[]'
|
3875
|
-
VersionChanged: '0.48
|
3923
|
+
VersionChanged: '0.48'
|
3876
3924
|
|
3877
3925
|
Style/PercentQLiterals:
|
3878
3926
|
Description: 'Checks if uses of %Q/%q match the configured preference.'
|
@@ -4222,6 +4270,13 @@ Style/StabbyLambdaParentheses:
|
|
4222
4270
|
- require_parentheses
|
4223
4271
|
- require_no_parentheses
|
4224
4272
|
|
4273
|
+
Style/StaticClass:
|
4274
|
+
Description: 'Prefer modules to classes with only class methods.'
|
4275
|
+
StyleGuide: '#modules-vs-classes'
|
4276
|
+
Enabled: false
|
4277
|
+
Safe: false
|
4278
|
+
VersionAdded: '1.3'
|
4279
|
+
|
4225
4280
|
Style/StderrPuts:
|
4226
4281
|
Description: 'Use `warn` instead of `$stderr.puts`.'
|
4227
4282
|
StyleGuide: '#warn'
|
@@ -4272,7 +4327,7 @@ Style/StringMethods:
|
|
4272
4327
|
Description: 'Checks if configured preferred methods are used over non-preferred.'
|
4273
4328
|
Enabled: false
|
4274
4329
|
VersionAdded: '0.34'
|
4275
|
-
VersionChanged: '0.34
|
4330
|
+
VersionChanged: '0.34'
|
4276
4331
|
# Mapping from undesired method to desired_method
|
4277
4332
|
# e.g. to use `to_sym` over `intern`:
|
4278
4333
|
#
|
data/lib/cookstyle/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cookstyle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.1
|
4
|
+
version: 7.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thom May
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-11-
|
12
|
+
date: 2020-11-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubocop
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.
|
20
|
+
version: 1.3.1
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 1.
|
27
|
+
version: 1.3.1
|
28
28
|
description:
|
29
29
|
email:
|
30
30
|
- thom@chef.io
|