chefstyle 1.0.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/chefstyle.gemspec +2 -2
- data/config/chefstyle.yml +6 -0
- data/config/disable_all.yml +16 -0
- data/config/upstream.yml +111 -23
- data/lib/chefstyle/version.rb +2 -2
- metadata +5 -6
- data/Gemfile +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 423500f6eb097e6b1d618a9af1f2709e2185c61bb2ad1f98d2c2796827d14f0e
|
4
|
+
data.tar.gz: 915a023dceef60d5e35e783cc6415751f1008ba55bb0e10a8b92620e2ac2f13d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5db0b4e3239e1243fd6947f0b99198a28984552cce90d4ba36c1a58b712390a65b5047966d67fdf5f8a7bf5052d20b6febde5b12851e2e8c30ccf947717c9c7
|
7
|
+
data.tar.gz: 16c99a1b36cb3d3347120e242cf2719b1276f25bfa52ff07ece52f561ba5a351f9eb5f8e635a313a4a63dda55b4847ef330f815217ba116c095242a7cadb3c09
|
data/chefstyle.gemspec
CHANGED
@@ -9,12 +9,12 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Chef Software, Inc."]
|
10
10
|
spec.email = ["oss@chef.io"]
|
11
11
|
|
12
|
-
spec.summary = %q{
|
12
|
+
spec.summary = %q{RuboCop configuration for Chef's ruby projects}
|
13
13
|
spec.homepage = "https://github.com/chef/chefstyle"
|
14
14
|
spec.license = "Apache-2.0"
|
15
15
|
spec.required_ruby_version = ">= 2.4"
|
16
16
|
|
17
|
-
spec.files = %w{LICENSE chefstyle.gemspec
|
17
|
+
spec.files = %w{LICENSE chefstyle.gemspec} + Dir.glob("{bin,config,lib}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
|
18
18
|
spec.executables = %w{chefstyle}
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
data/config/chefstyle.yml
CHANGED
@@ -123,6 +123,8 @@ Lint/UselessSetterCall:
|
|
123
123
|
Enabled: true
|
124
124
|
Lint/Void:
|
125
125
|
Enabled: true
|
126
|
+
Layout/CommentIndentation:
|
127
|
+
Enabled: true
|
126
128
|
|
127
129
|
#
|
128
130
|
# Disabled Lint
|
@@ -626,3 +628,7 @@ Style/Alias:
|
|
626
628
|
# anyone else's time either.
|
627
629
|
Style/CommentedKeyword:
|
628
630
|
Enabled: false
|
631
|
+
|
632
|
+
# make sure we catch this Ruby 3.0 breaking change now
|
633
|
+
Lint/DeprecatedOpenSSLConstant:
|
634
|
+
Enabled: true
|
data/config/disable_all.yml
CHANGED
@@ -59,6 +59,8 @@ Layout/EmptyLinesAroundAccessModifier:
|
|
59
59
|
Enabled: false
|
60
60
|
Layout/EmptyLinesAroundArguments:
|
61
61
|
Enabled: false
|
62
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
63
|
+
Enabled: false
|
62
64
|
Layout/EmptyLinesAroundBeginBody:
|
63
65
|
Enabled: false
|
64
66
|
Layout/EmptyLinesAroundBlockBody:
|
@@ -209,10 +211,14 @@ Lint/BooleanSymbol:
|
|
209
211
|
Enabled: false
|
210
212
|
Lint/CircularArgumentReference:
|
211
213
|
Enabled: false
|
214
|
+
Lint/ConstantResolution:
|
215
|
+
Enabled: false
|
212
216
|
Lint/Debugger:
|
213
217
|
Enabled: false
|
214
218
|
Lint/DeprecatedClassMethods:
|
215
219
|
Enabled: false
|
220
|
+
Lint/DeprecatedOpenSSLConstant:
|
221
|
+
Enabled: false
|
216
222
|
Lint/DisjunctiveAssignmentInConstructor:
|
217
223
|
Enabled: false
|
218
224
|
Lint/DuplicateCaseCondition:
|
@@ -261,6 +267,8 @@ Lint/Loop:
|
|
261
267
|
Enabled: false
|
262
268
|
Lint/MissingCopEnableDirective:
|
263
269
|
Enabled: false
|
270
|
+
Lint/MixedRegexpCaptureTypes:
|
271
|
+
Enabled: false
|
264
272
|
Lint/MultipleComparison:
|
265
273
|
Enabled: false
|
266
274
|
Lint/NestedMethodDefinition:
|
@@ -559,6 +567,8 @@ Style/MethodCallWithoutArgsParentheses:
|
|
559
567
|
Enabled: false
|
560
568
|
Style/MethodCallWithArgsParentheses:
|
561
569
|
Enabled: false
|
570
|
+
Style/RedundantFetchBlock:
|
571
|
+
Enabled: false
|
562
572
|
Style/MethodCalledOnDoEndBlock:
|
563
573
|
Enabled: false
|
564
574
|
Style/MethodDefParentheses:
|
@@ -665,6 +675,10 @@ Style/RedundantParentheses:
|
|
665
675
|
Enabled: false
|
666
676
|
Style/RedundantPercentQ:
|
667
677
|
Enabled: false
|
678
|
+
Style/RedundantRegexpCharacterClass:
|
679
|
+
Enabled: false
|
680
|
+
Style/RedundantRegexpEscape:
|
681
|
+
Enabled: false
|
668
682
|
Style/RedundantReturn:
|
669
683
|
Enabled: false
|
670
684
|
Style/RedundantSelf:
|
@@ -697,6 +711,8 @@ Style/SingleLineBlockParams:
|
|
697
711
|
Enabled: false
|
698
712
|
Style/SingleLineMethods:
|
699
713
|
Enabled: false
|
714
|
+
Style/SlicingWithRange:
|
715
|
+
Enabled: false
|
700
716
|
Style/SpecialGlobalVars:
|
701
717
|
Enabled: false
|
702
718
|
Style/StabbyLambdaParentheses:
|
data/config/upstream.yml
CHANGED
@@ -35,6 +35,7 @@ AllCops:
|
|
35
35
|
- '**/*.watchr'
|
36
36
|
- '**/.irbrc'
|
37
37
|
- '**/.pryrc'
|
38
|
+
- '**/.simplecov'
|
38
39
|
- '**/buildfile'
|
39
40
|
- '**/Appraisals'
|
40
41
|
- '**/Berksfile'
|
@@ -53,6 +54,7 @@ AllCops:
|
|
53
54
|
- '**/Podfile'
|
54
55
|
- '**/Puppetfile'
|
55
56
|
- '**/Rakefile'
|
57
|
+
- '**/rakefile'
|
56
58
|
- '**/Snapfile'
|
57
59
|
- '**/Steepfile'
|
58
60
|
- '**/Thorfile'
|
@@ -151,12 +153,13 @@ Bundler/GemComment:
|
|
151
153
|
Description: 'Add a comment describing each gem.'
|
152
154
|
Enabled: false
|
153
155
|
VersionAdded: '0.59'
|
154
|
-
VersionChanged: '0.
|
156
|
+
VersionChanged: '0.85'
|
155
157
|
Include:
|
156
158
|
- '**/*.gemfile'
|
157
159
|
- '**/Gemfile'
|
158
160
|
- '**/gems.rb'
|
159
161
|
IgnoredGems: []
|
162
|
+
OnlyFor: []
|
160
163
|
|
161
164
|
Bundler/InsecureProtocolSource:
|
162
165
|
Description: >-
|
@@ -375,6 +378,7 @@ Layout/ConditionPosition:
|
|
375
378
|
StyleGuide: '#same-line-condition'
|
376
379
|
Enabled: true
|
377
380
|
VersionAdded: '0.53'
|
381
|
+
VersionChanged: '0.83'
|
378
382
|
|
379
383
|
Layout/DefEndAlignment:
|
380
384
|
Description: 'Align ends corresponding to defs correctly.'
|
@@ -460,6 +464,19 @@ Layout/EmptyLinesAroundArguments:
|
|
460
464
|
Enabled: true
|
461
465
|
VersionAdded: '0.52'
|
462
466
|
|
467
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
468
|
+
Description: "Keep blank lines around attribute accessors."
|
469
|
+
StyleGuide: '#empty-lines-around-attribute-accessor'
|
470
|
+
Enabled: pending
|
471
|
+
VersionAdded: '0.83'
|
472
|
+
VersionChanged: '0.84'
|
473
|
+
AllowAliasSyntax: true
|
474
|
+
AllowedMethods:
|
475
|
+
- alias_method
|
476
|
+
- public
|
477
|
+
- protected
|
478
|
+
- private
|
479
|
+
|
463
480
|
Layout/EmptyLinesAroundBeginBody:
|
464
481
|
Description: "Keeps track of empty lines around begin-end bodies."
|
465
482
|
StyleGuide: '#empty-lines-around-bodies'
|
@@ -774,13 +791,7 @@ Layout/HeredocIndentation:
|
|
774
791
|
StyleGuide: '#squiggly-heredocs'
|
775
792
|
Enabled: true
|
776
793
|
VersionAdded: '0.49'
|
777
|
-
VersionChanged: '0.
|
778
|
-
EnforcedStyle: squiggly
|
779
|
-
SupportedStyles:
|
780
|
-
- squiggly
|
781
|
-
- active_support
|
782
|
-
- powerpack
|
783
|
-
- unindent
|
794
|
+
VersionChanged: '0.85'
|
784
795
|
|
785
796
|
Layout/IndentationConsistency:
|
786
797
|
Description: 'Keep indentation straight.'
|
@@ -848,13 +859,13 @@ Layout/LeadingEmptyLines:
|
|
848
859
|
VersionChanged: '0.77'
|
849
860
|
|
850
861
|
Layout/LineLength:
|
851
|
-
Description: '
|
852
|
-
StyleGuide: '#
|
862
|
+
Description: 'Checks that line length does not exceed the configured limit.'
|
863
|
+
StyleGuide: '#max-line-length'
|
853
864
|
Enabled: true
|
854
865
|
VersionAdded: '0.25'
|
855
|
-
VersionChanged: '0.
|
866
|
+
VersionChanged: '0.84'
|
856
867
|
AutoCorrect: false
|
857
|
-
Max:
|
868
|
+
Max: 120
|
858
869
|
# To make it possible to copy or click on URIs in the code, we allow lines
|
859
870
|
# containing a URI to be longer than Max.
|
860
871
|
AllowHeredoc: true
|
@@ -1295,8 +1306,8 @@ Layout/TrailingWhitespace:
|
|
1295
1306
|
StyleGuide: '#no-trailing-whitespace'
|
1296
1307
|
Enabled: true
|
1297
1308
|
VersionAdded: '0.49'
|
1298
|
-
VersionChanged: '0.
|
1299
|
-
AllowInHeredoc:
|
1309
|
+
VersionChanged: '0.83'
|
1310
|
+
AllowInHeredoc: true
|
1300
1311
|
|
1301
1312
|
#################### Lint ##################################
|
1302
1313
|
### Warnings
|
@@ -1316,6 +1327,7 @@ Lint/AmbiguousOperator:
|
|
1316
1327
|
StyleGuide: '#method-invocation-parens'
|
1317
1328
|
Enabled: true
|
1318
1329
|
VersionAdded: '0.17'
|
1330
|
+
VersionChanged: '0.83'
|
1319
1331
|
|
1320
1332
|
Lint/AmbiguousRegexpLiteral:
|
1321
1333
|
Description: >-
|
@@ -1323,6 +1335,7 @@ Lint/AmbiguousRegexpLiteral:
|
|
1323
1335
|
a method invocation without parentheses.
|
1324
1336
|
Enabled: true
|
1325
1337
|
VersionAdded: '0.17'
|
1338
|
+
VersionChanged: '0.83'
|
1326
1339
|
|
1327
1340
|
Lint/AssignmentInCondition:
|
1328
1341
|
Description: "Don't use assignment in conditions."
|
@@ -1339,14 +1352,24 @@ Lint/BigDecimalNew:
|
|
1339
1352
|
Lint/BooleanSymbol:
|
1340
1353
|
Description: 'Check for `:true` and `:false` symbols.'
|
1341
1354
|
Enabled: true
|
1355
|
+
Safe: false
|
1342
1356
|
VersionAdded: '0.50'
|
1343
|
-
VersionChanged: '0.
|
1357
|
+
VersionChanged: '0.83'
|
1344
1358
|
|
1345
1359
|
Lint/CircularArgumentReference:
|
1346
1360
|
Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
|
1347
1361
|
Enabled: true
|
1348
1362
|
VersionAdded: '0.33'
|
1349
1363
|
|
1364
|
+
Lint/ConstantResolution:
|
1365
|
+
Description: 'Check that constants are fully qualified with `::`.'
|
1366
|
+
Enabled: false
|
1367
|
+
VersionAdded: '0.86'
|
1368
|
+
# Restrict this cop to only looking at certain names
|
1369
|
+
Only: []
|
1370
|
+
# Restrict this cop from only looking at certain names
|
1371
|
+
Ignore: []
|
1372
|
+
|
1350
1373
|
Lint/Debugger:
|
1351
1374
|
Description: 'Check for debugger calls.'
|
1352
1375
|
Enabled: true
|
@@ -1358,6 +1381,11 @@ Lint/DeprecatedClassMethods:
|
|
1358
1381
|
Enabled: true
|
1359
1382
|
VersionAdded: '0.19'
|
1360
1383
|
|
1384
|
+
Lint/DeprecatedOpenSSLConstant:
|
1385
|
+
Description: "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`."
|
1386
|
+
Enabled: pending
|
1387
|
+
VersionAdded: '0.84'
|
1388
|
+
|
1361
1389
|
Lint/DisjunctiveAssignmentInConstructor:
|
1362
1390
|
Description: 'In constructor, plain assignment is preferred over disjunctive.'
|
1363
1391
|
Enabled: true
|
@@ -1411,13 +1439,16 @@ Lint/EmptyInterpolation:
|
|
1411
1439
|
Lint/EmptyWhen:
|
1412
1440
|
Description: 'Checks for `when` branches with empty bodies.'
|
1413
1441
|
Enabled: true
|
1442
|
+
AllowComments: true
|
1414
1443
|
VersionAdded: '0.45'
|
1444
|
+
VersionChanged: '0.83'
|
1415
1445
|
|
1416
1446
|
Lint/EnsureReturn:
|
1417
1447
|
Description: 'Do not use return in an ensure block.'
|
1418
1448
|
StyleGuide: '#no-return-ensure'
|
1419
1449
|
Enabled: true
|
1420
1450
|
VersionAdded: '0.9'
|
1451
|
+
VersionChanged: '0.83'
|
1421
1452
|
|
1422
1453
|
Lint/ErbNewArguments:
|
1423
1454
|
Description: 'Use `:trim_mode` and `:eoutvar` keyword arguments to `ERB.new`.'
|
@@ -1511,6 +1542,11 @@ Lint/MissingCopEnableDirective:
|
|
1511
1542
|
# .inf for any size
|
1512
1543
|
MaximumRangeSize: .inf
|
1513
1544
|
|
1545
|
+
Lint/MixedRegexpCaptureTypes:
|
1546
|
+
Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
|
1547
|
+
Enabled: pending
|
1548
|
+
VersionAdded: '0.85'
|
1549
|
+
|
1514
1550
|
Lint/MultipleComparison:
|
1515
1551
|
Description: "Use `&&` operator to compare multiple values."
|
1516
1552
|
Enabled: true
|
@@ -1565,6 +1601,7 @@ Lint/ParenthesesAsGroupedExpression:
|
|
1565
1601
|
StyleGuide: '#parens-no-spaces'
|
1566
1602
|
Enabled: true
|
1567
1603
|
VersionAdded: '0.12'
|
1604
|
+
VersionChanged: '0.83'
|
1568
1605
|
|
1569
1606
|
Lint/PercentStringArray:
|
1570
1607
|
Description: >-
|
@@ -1583,7 +1620,9 @@ Lint/RaiseException:
|
|
1583
1620
|
Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
|
1584
1621
|
StyleGuide: '#raise-exception'
|
1585
1622
|
Enabled: pending
|
1623
|
+
Safe: false
|
1586
1624
|
VersionAdded: '0.81'
|
1625
|
+
VersionChanged: '0.86'
|
1587
1626
|
AllowedImplicitNamespaces:
|
1588
1627
|
- 'Gem'
|
1589
1628
|
|
@@ -1640,6 +1679,7 @@ Lint/RegexpAsCondition:
|
|
1640
1679
|
The regexp literal matches `$_` implicitly.
|
1641
1680
|
Enabled: true
|
1642
1681
|
VersionAdded: '0.51'
|
1682
|
+
VersionChanged: '0.86'
|
1643
1683
|
|
1644
1684
|
Lint/RequireParentheses:
|
1645
1685
|
Description: >-
|
@@ -1808,7 +1848,7 @@ Lint/UselessAccessModifier:
|
|
1808
1848
|
Description: 'Checks for useless access modifiers.'
|
1809
1849
|
Enabled: true
|
1810
1850
|
VersionAdded: '0.20'
|
1811
|
-
VersionChanged: '0.
|
1851
|
+
VersionChanged: '0.83'
|
1812
1852
|
ContextCreatingMethods: []
|
1813
1853
|
MethodCreatingMethods: []
|
1814
1854
|
|
@@ -1897,7 +1937,7 @@ Metrics/CyclomaticComplexity:
|
|
1897
1937
|
VersionAdded: '0.25'
|
1898
1938
|
VersionChanged: '0.81'
|
1899
1939
|
IgnoredMethods: []
|
1900
|
-
Max:
|
1940
|
+
Max: 7
|
1901
1941
|
|
1902
1942
|
Metrics/MethodLength:
|
1903
1943
|
Description: 'Avoid methods longer than 10 lines of code.'
|
@@ -1983,6 +2023,11 @@ Naming/ClassAndModuleCamelCase:
|
|
1983
2023
|
StyleGuide: '#camelcase-classes'
|
1984
2024
|
Enabled: true
|
1985
2025
|
VersionAdded: '0.50'
|
2026
|
+
VersionChanged: '0.85'
|
2027
|
+
# Allowed class/module names can be specified here.
|
2028
|
+
# These can be full or part of the name.
|
2029
|
+
AllowedNames:
|
2030
|
+
- module_parent
|
1986
2031
|
|
1987
2032
|
Naming/ConstantName:
|
1988
2033
|
Description: 'Constants should use SCREAMING_SNAKE_CASE.'
|
@@ -2003,6 +2048,10 @@ Naming/FileName:
|
|
2003
2048
|
# It further expects it to be nested inside modules which match the names
|
2004
2049
|
# of subdirectories in its path.
|
2005
2050
|
ExpectMatchingDefinition: false
|
2051
|
+
# When `false`, changes the behavior of ExpectMatchingDefinition to match only
|
2052
|
+
# whether each source file's class or module name matches the file name --
|
2053
|
+
# not whether the nested module hierarchy matches the subdirectory path.
|
2054
|
+
CheckDefinitionPathHierarchy: true
|
2006
2055
|
# If non-`nil`, expect all source file names to match the following regex.
|
2007
2056
|
# Only the file name itself is matched, not the entire file path.
|
2008
2057
|
# Use anchors as necessary if you want to match the entire name rather than
|
@@ -2194,7 +2243,7 @@ Security/JSONLoad:
|
|
2194
2243
|
Description: >-
|
2195
2244
|
Prefer usage of `JSON.parse` over `JSON.load` due to potential
|
2196
2245
|
security issues. See reference for more information.
|
2197
|
-
Reference: 'https://ruby-doc.org/stdlib-2.
|
2246
|
+
Reference: 'https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html#method-i-load'
|
2198
2247
|
Enabled: true
|
2199
2248
|
VersionAdded: '0.43'
|
2200
2249
|
VersionChanged: '0.44'
|
@@ -2207,7 +2256,7 @@ Security/MarshalLoad:
|
|
2207
2256
|
Description: >-
|
2208
2257
|
Avoid using of `Marshal.load` or `Marshal.restore` due to potential
|
2209
2258
|
security issues. See reference for more information.
|
2210
|
-
Reference: 'https://ruby-doc.org/core-2.
|
2259
|
+
Reference: 'https://ruby-doc.org/core-2.7.0/Marshal.html#module-Marshal-label-Security+considerations'
|
2211
2260
|
Enabled: true
|
2212
2261
|
VersionAdded: '0.47'
|
2213
2262
|
|
@@ -2221,7 +2270,7 @@ Security/YAMLLoad:
|
|
2221
2270
|
Description: >-
|
2222
2271
|
Prefer usage of `YAML.safe_load` over `YAML.load` due to potential
|
2223
2272
|
security issues. See reference for more information.
|
2224
|
-
Reference: 'https://ruby-doc.org/stdlib-2.
|
2273
|
+
Reference: 'https://ruby-doc.org/stdlib-2.7.0/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security'
|
2225
2274
|
Enabled: true
|
2226
2275
|
VersionAdded: '0.47'
|
2227
2276
|
SafeAutoCorrect: false
|
@@ -2258,7 +2307,7 @@ Style/AndOr:
|
|
2258
2307
|
VersionChanged: '0.25'
|
2259
2308
|
# Whether `and` and `or` are banned only in conditionals (conditionals)
|
2260
2309
|
# or completely (always).
|
2261
|
-
EnforcedStyle:
|
2310
|
+
EnforcedStyle: conditionals
|
2262
2311
|
SupportedStyles:
|
2263
2312
|
- always
|
2264
2313
|
- conditionals
|
@@ -2678,6 +2727,11 @@ Style/DoubleNegation:
|
|
2678
2727
|
StyleGuide: '#no-bang-bang'
|
2679
2728
|
Enabled: true
|
2680
2729
|
VersionAdded: '0.19'
|
2730
|
+
VersionChanged: '0.84'
|
2731
|
+
EnforcedStyle: allowed_in_returns
|
2732
|
+
SupportedStyles:
|
2733
|
+
- allowed_in_returns
|
2734
|
+
- forbidden
|
2681
2735
|
|
2682
2736
|
Style/EachForSimpleLoop:
|
2683
2737
|
Description: >-
|
@@ -2841,8 +2895,7 @@ Style/FrozenStringLiteralComment:
|
|
2841
2895
|
SupportedStyles:
|
2842
2896
|
# `always` will always add the frozen string literal comment to a file
|
2843
2897
|
# regardless of the Ruby version or if `freeze` or `<<` are called on a
|
2844
|
-
# string literal.
|
2845
|
-
# possible that this will create errors in Ruby 2.3.0+.
|
2898
|
+
# string literal. It is possible that this will create errors.
|
2846
2899
|
- always
|
2847
2900
|
# `always_true` will add the frozen string literal comment to a file,
|
2848
2901
|
# similarly to the `always` style, but will also change any disabled
|
@@ -2948,6 +3001,7 @@ Style/IfWithSemicolon:
|
|
2948
3001
|
StyleGuide: '#no-semicolon-ifs'
|
2949
3002
|
Enabled: true
|
2950
3003
|
VersionAdded: '0.9'
|
3004
|
+
VersionChanged: '0.83'
|
2951
3005
|
|
2952
3006
|
Style/ImplicitRuntimeError:
|
2953
3007
|
Description: >-
|
@@ -3197,6 +3251,7 @@ Style/MultilineTernaryOperator:
|
|
3197
3251
|
StyleGuide: '#no-multiline-ternary'
|
3198
3252
|
Enabled: true
|
3199
3253
|
VersionAdded: '0.9'
|
3254
|
+
VersionChanged: '0.86'
|
3200
3255
|
|
3201
3256
|
Style/MultilineWhenThen:
|
3202
3257
|
Description: 'Do not use then for multi-line when statement.'
|
@@ -3301,6 +3356,7 @@ Style/NestedTernaryOperator:
|
|
3301
3356
|
StyleGuide: '#no-nested-ternary'
|
3302
3357
|
Enabled: true
|
3303
3358
|
VersionAdded: '0.9'
|
3359
|
+
VersionChanged: '0.86'
|
3304
3360
|
|
3305
3361
|
Style/Next:
|
3306
3362
|
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
@@ -3425,7 +3481,9 @@ Style/OptionalArguments:
|
|
3425
3481
|
of the argument list.
|
3426
3482
|
StyleGuide: '#optional-arguments'
|
3427
3483
|
Enabled: true
|
3484
|
+
Safe: false
|
3428
3485
|
VersionAdded: '0.33'
|
3486
|
+
VersionChanged: '0.83'
|
3429
3487
|
|
3430
3488
|
Style/OrAssignment:
|
3431
3489
|
Description: 'Recommend usage of double pipe equals (||=) where applicable.'
|
@@ -3552,6 +3610,19 @@ Style/RedundantException:
|
|
3552
3610
|
VersionAdded: '0.14'
|
3553
3611
|
VersionChanged: '0.29'
|
3554
3612
|
|
3613
|
+
Style/RedundantFetchBlock:
|
3614
|
+
Description: >-
|
3615
|
+
Use `fetch(key, value)` instead of `fetch(key) { value }`
|
3616
|
+
when value has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or is a constant.
|
3617
|
+
Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashfetch-with-argument-vs-hashfetch--block-code'
|
3618
|
+
Enabled: 'pending'
|
3619
|
+
Safe: false
|
3620
|
+
# If enabled, this cop will autocorrect usages of
|
3621
|
+
# `fetch` being called with block returning a constant.
|
3622
|
+
# This can be dangerous since constants will not be defined at that moment.
|
3623
|
+
SafeForConstants: false
|
3624
|
+
VersionAdded: '0.86'
|
3625
|
+
|
3555
3626
|
Style/RedundantFreeze:
|
3556
3627
|
Description: "Checks usages of Object#freeze on immutable objects."
|
3557
3628
|
Enabled: true
|
@@ -3574,6 +3645,16 @@ Style/RedundantPercentQ:
|
|
3574
3645
|
Enabled: true
|
3575
3646
|
VersionAdded: '0.76'
|
3576
3647
|
|
3648
|
+
Style/RedundantRegexpCharacterClass:
|
3649
|
+
Description: 'Checks for unnecessary single-element Regexp character classes.'
|
3650
|
+
Enabled: pending
|
3651
|
+
VersionAdded: '0.85'
|
3652
|
+
|
3653
|
+
Style/RedundantRegexpEscape:
|
3654
|
+
Description: 'Checks for redundant escapes in Regexps.'
|
3655
|
+
Enabled: pending
|
3656
|
+
VersionAdded: '0.85'
|
3657
|
+
|
3577
3658
|
Style/RedundantReturn:
|
3578
3659
|
Description: "Don't use return where it's not required."
|
3579
3660
|
StyleGuide: '#no-explicit-return'
|
@@ -3730,6 +3811,12 @@ Style/SingleLineMethods:
|
|
3730
3811
|
VersionChanged: '0.19'
|
3731
3812
|
AllowIfMethodIsEmpty: true
|
3732
3813
|
|
3814
|
+
Style/SlicingWithRange:
|
3815
|
+
Description: 'Checks array slicing is done with endless ranges when suitable.'
|
3816
|
+
Enabled: pending
|
3817
|
+
VersionAdded: '0.83'
|
3818
|
+
Safe: false
|
3819
|
+
|
3733
3820
|
Style/SpecialGlobalVars:
|
3734
3821
|
Description: 'Avoid Perl-style global variables.'
|
3735
3822
|
StyleGuide: '#no-cryptic-perlisms'
|
@@ -3815,6 +3902,7 @@ Style/StructInheritance:
|
|
3815
3902
|
StyleGuide: '#no-extend-struct-new'
|
3816
3903
|
Enabled: true
|
3817
3904
|
VersionAdded: '0.29'
|
3905
|
+
VersionChanged: '0.86'
|
3818
3906
|
|
3819
3907
|
Style/SymbolArray:
|
3820
3908
|
Description: 'Use %i or %I for arrays of symbols.'
|
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.
|
4
|
+
version: 1.1.2
|
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-06-25 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.86.0
|
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.86.0
|
69
69
|
description:
|
70
70
|
email:
|
71
71
|
- oss@chef.io
|
@@ -74,7 +74,6 @@ executables:
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- Gemfile
|
78
77
|
- LICENSE
|
79
78
|
- bin/chefstyle
|
80
79
|
- chefstyle.gemspec
|
@@ -106,5 +105,5 @@ requirements: []
|
|
106
105
|
rubygems_version: 3.0.3
|
107
106
|
signing_key:
|
108
107
|
specification_version: 4
|
109
|
-
summary:
|
108
|
+
summary: RuboCop configuration for Chef's ruby projects
|
110
109
|
test_files: []
|
data/Gemfile
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in chefstyle.gemspec
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
group :debug do
|
7
|
-
gem "pry"
|
8
|
-
gem "pry-byebug"
|
9
|
-
gem "pry-stack_explorer"
|
10
|
-
end
|
11
|
-
|
12
|
-
group :docs do
|
13
|
-
gem "github-markup"
|
14
|
-
gem "redcarpet"
|
15
|
-
gem "yard"
|
16
|
-
end
|