chefstyle 2.0.6 → 2.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a61b388a0bd0cc6406d42044dd437868ac702d71f4c1c65371a91123eaa3234
4
- data.tar.gz: 2168512c0fecb8b5a2ea6c4f6e78b66eeac9cd49890e8c040f7493d317f9835c
3
+ metadata.gz: 3fd3b7ee2c2b897278e81858af450a48fa72bac1e64fdc60f09a4f419b3b5588
4
+ data.tar.gz: 7553f506631f741900f40872727ec2a0f6c3abfc8a0b1ba00947dd2c4546ce6b
5
5
  SHA512:
6
- metadata.gz: d8183c386be7ccef124ad1c82cfdbf0c147178a5f2beb0c9aeeb70d28f117a339fe4914e538c512d83758a5efdeb29aa0aaec810fbb1d6150fb5d2b1061b4a9e
7
- data.tar.gz: 37ccdda60b83bef2ef3f90ef0d36efdcd1eb48e9d9b2e7e008057850ee2f968de1d92f08c809cd89f52b9cfe2dd9f3db2cc6f621161a99289881f9c90c2fade2
6
+ metadata.gz: ab3cbc02ed9987b77d29206938e2dac4f1ce1e4c84cf60013b3dd2f3b998e7531cb935e91b972d865ba6ba2cb1d51c7116ac8abf7b74db9402dec088b721353c
7
+ data.tar.gz: a24689342db2bdeb3717e812314bffdd369690d68d94332abd885dd0ea108f7f96f3f9b47779c976938fc94788a5141621fe8a83912bb0665f6647bef9e9c5a0
data/config/chefstyle.yml CHANGED
@@ -9,6 +9,10 @@ AllCops:
9
9
  Bundler/DuplicatedGem:
10
10
  Enabled: false
11
11
 
12
+ Bundler/InsecureProtocolSource:
13
+ Enabled: true
14
+ AllowHttpProtocol: false
15
+
12
16
  #
13
17
  # Lint
14
18
  #
@@ -5,6 +5,8 @@ Bundler/DuplicatedGem:
5
5
  Enabled: false
6
6
  Bundler/GemComment:
7
7
  Enabled: false
8
+ Bundler/GemFilename:
9
+ Enabled: false
8
10
  Bundler/GemVersion:
9
11
  Enabled: false
10
12
  Bundler/InsecureProtocolSource:
@@ -219,6 +221,10 @@ Lint/AmbiguousBlockAssociation:
219
221
  Enabled: false
220
222
  Lint/AmbiguousOperator:
221
223
  Enabled: false
224
+ Lint/AmbiguousOperatorPrecedence:
225
+ Enabled: false
226
+ Lint/AmbiguousRange:
227
+ Enabled: false
222
228
  Lint/AmbiguousRegexpLiteral:
223
229
  Enabled: false
224
230
  Lint/AssignmentInCondition:
@@ -303,10 +309,12 @@ Lint/IdentityComparison:
303
309
  Enabled: false
304
310
  Lint/ImplicitStringConcatenation:
305
311
  Enabled: false
306
- Lint/InheritException:
312
+ Lint/IncompatibleIoSelectWithFiberScheduler:
307
313
  Enabled: false
308
314
  Lint/IneffectiveAccessModifier:
309
315
  Enabled: false
316
+ Lint/InheritException:
317
+ Enabled: false
310
318
  Lint/InterpolationCheck:
311
319
  Enabled: false
312
320
  Lint/LambdaWithoutLiteralBlock:
@@ -379,6 +387,8 @@ Lint/RegexpAsCondition:
379
387
  Enabled: false
380
388
  Lint/RequireParentheses:
381
389
  Enabled: false
390
+ Lint/RequireRelativeSelfPath:
391
+ Enabled: false
382
392
  Lint/RescueException:
383
393
  Enabled: false
384
394
  Lint/RescueType:
@@ -697,6 +707,8 @@ Style/MethodCallWithArgsParentheses:
697
707
  Enabled: false
698
708
  Style/MultilineInPatternThen:
699
709
  Enabled: false
710
+ Style/NumberedParameters:
711
+ Enabled: false
700
712
  Style/RedundantAssignment:
701
713
  Enabled: false
702
714
  Style/RedundantFetchBlock:
@@ -705,6 +717,8 @@ Style/RedundantFileExtensionInRequire:
705
717
  Enabled: false
706
718
  Style/RedundantSelfAssignment:
707
719
  Enabled: false
720
+ Style/RedundantSelfAssignmentBranch:
721
+ Enabled: false
708
722
  Style/SoleNestedConditional:
709
723
  Enabled: false
710
724
  Style/StaticClass:
@@ -767,6 +781,8 @@ Style/NonNilCheck:
767
781
  Enabled: false
768
782
  Style/Not:
769
783
  Enabled: false
784
+ Style/NumberedParametersLimit:
785
+ Enabled: false
770
786
  Style/NumericLiterals:
771
787
  Enabled: false
772
788
  Style/NumericLiteralPrefix:
@@ -847,6 +863,8 @@ Style/SafeNavigation:
847
863
  Enabled: false
848
864
  Style/Sample:
849
865
  Enabled: false
866
+ Style/SelectByRegexp:
867
+ Enabled: false
850
868
  Style/SelfAssignment:
851
869
  Enabled: false
852
870
  Style/Semicolon:
@@ -939,6 +957,8 @@ Style/ZeroLengthPredicate:
939
957
  Enabled: false
940
958
  Security/Eval:
941
959
  Enabled: false
960
+ Security/IoMethods:
961
+ Enabled: false
942
962
  Security/JSONLoad:
943
963
  Enabled: false
944
964
  Security/MarshalLoad:
data/config/upstream.yml CHANGED
@@ -130,7 +130,7 @@ AllCops:
130
130
  # What MRI version of the Ruby interpreter is the inspected code intended to
131
131
  # run on? (If there is more than one, set this to the lowest version.)
132
132
  # If a value is specified for TargetRubyVersion then it is used. Acceptable
133
- # values are specificed as a float (i.e. 3.0); the teeny version of Ruby
133
+ # values are specified as a float (i.e. 3.0); the teeny version of Ruby
134
134
  # should not be included. If the project specifies a Ruby version in the
135
135
  # .tool-versions or .ruby-version files, Gemfile or gems.rb file, RuboCop will
136
136
  # try to determine the desired version of Ruby by inspecting the
@@ -174,6 +174,20 @@ Bundler/GemComment:
174
174
  IgnoredGems: []
175
175
  OnlyFor: []
176
176
 
177
+ Bundler/GemFilename:
178
+ Description: 'Enforces the filename for managing gems.'
179
+ Enabled: true
180
+ VersionAdded: '1.20'
181
+ EnforcedStyle: 'Gemfile'
182
+ SupportedStyles:
183
+ - 'Gemfile'
184
+ - 'gems.rb'
185
+ Include:
186
+ - '**/Gemfile'
187
+ - '**/gems.rb'
188
+ - '**/Gemfile.lock'
189
+ - '**/gems.locked'
190
+
177
191
  Bundler/GemVersion:
178
192
  Description: 'Requires or forbids specifying gem versions.'
179
193
  Enabled: false
@@ -195,6 +209,7 @@ Bundler/InsecureProtocolSource:
195
209
  'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
196
210
  Enabled: true
197
211
  VersionAdded: '0.50'
212
+ AllowHttpProtocol: true
198
213
  Include:
199
214
  - '**/*.gemfile'
200
215
  - '**/Gemfile'
@@ -943,7 +958,6 @@ Layout/LineLength:
943
958
  Enabled: true
944
959
  VersionAdded: '0.25'
945
960
  VersionChanged: '1.4'
946
- AutoCorrect: true
947
961
  Max: 120
948
962
  # To make it possible to copy or click on URIs in the code, we allow lines
949
963
  # containing a URI to be longer than Max.
@@ -1347,10 +1361,11 @@ Layout/SpaceInsideParens:
1347
1361
  StyleGuide: '#spaces-braces'
1348
1362
  Enabled: true
1349
1363
  VersionAdded: '0.49'
1350
- VersionChanged: '0.55'
1364
+ VersionChanged: '1.22'
1351
1365
  EnforcedStyle: no_space
1352
1366
  SupportedStyles:
1353
1367
  - space
1368
+ - compact
1354
1369
  - no_space
1355
1370
 
1356
1371
  Layout/SpaceInsidePercentLiteralDelimiters:
@@ -1434,6 +1449,20 @@ Lint/AmbiguousOperator:
1434
1449
  VersionAdded: '0.17'
1435
1450
  VersionChanged: '0.83'
1436
1451
 
1452
+ Lint/AmbiguousOperatorPrecedence:
1453
+ Description: >-
1454
+ Checks for expressions containing multiple binary operations with
1455
+ ambiguous precedence.
1456
+ Enabled: pending
1457
+ VersionAdded: '1.21'
1458
+
1459
+ Lint/AmbiguousRange:
1460
+ Description: Checks for ranges with ambiguous boundaries.
1461
+ Enabled: pending
1462
+ VersionAdded: '1.19'
1463
+ SafeAutoCorrect: false
1464
+ RequireParenthesesForMethodChains: false
1465
+
1437
1466
  Lint/AmbiguousRegexpLiteral:
1438
1467
  Description: >-
1439
1468
  Checks for ambiguous regexp literals in the first argument of
@@ -1464,9 +1493,9 @@ Lint/BinaryOperatorWithIdenticalOperands:
1464
1493
  Lint/BooleanSymbol:
1465
1494
  Description: 'Check for `:true` and `:false` symbols.'
1466
1495
  Enabled: true
1467
- Safe: false
1496
+ SafeAutoCorrect: false
1468
1497
  VersionAdded: '0.50'
1469
- VersionChanged: '0.83'
1498
+ VersionChanged: '1.22'
1470
1499
 
1471
1500
  Lint/CircularArgumentReference:
1472
1501
  Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
@@ -1512,6 +1541,11 @@ Lint/Debugger:
1512
1541
  Capybara:
1513
1542
  - save_and_open_page
1514
1543
  - save_and_open_screenshot
1544
+ debug.rb:
1545
+ - binding.b
1546
+ - binding.break
1547
+ - Kernel.binding.b
1548
+ - Kernel.binding.break
1515
1549
  Pry:
1516
1550
  - binding.pry
1517
1551
  - binding.remote_pry
@@ -1520,6 +1554,8 @@ Lint/Debugger:
1520
1554
  Rails:
1521
1555
  - debugger
1522
1556
  - Kernel.debugger
1557
+ RubyJard:
1558
+ - jard
1523
1559
  WebConsole:
1524
1560
  - binding.console
1525
1561
 
@@ -1743,6 +1779,11 @@ Lint/ImplicitStringConcatenation:
1743
1779
  Enabled: true
1744
1780
  VersionAdded: '0.36'
1745
1781
 
1782
+ Lint/IncompatibleIoSelectWithFiberScheduler:
1783
+ Description: 'Checks for `IO.select` that is incompatible with Fiber Scheduler.'
1784
+ Enabled: pending
1785
+ VersionAdded: '1.21'
1786
+
1746
1787
  Lint/IneffectiveAccessModifier:
1747
1788
  Description: >-
1748
1789
  Checks for attempts to use `private` or `protected` to set
@@ -1824,7 +1865,6 @@ Lint/MultipleComparison:
1824
1865
  Enabled: true
1825
1866
  VersionAdded: '0.47'
1826
1867
  VersionChanged: '1.1'
1827
- AllowMethodComparison: true
1828
1868
 
1829
1869
  Lint/NestedMethodDefinition:
1830
1870
  Description: 'Do not use nested method definitions.'
@@ -2007,6 +2047,11 @@ Lint/RequireParentheses:
2007
2047
  Enabled: true
2008
2048
  VersionAdded: '0.18'
2009
2049
 
2050
+ Lint/RequireRelativeSelfPath:
2051
+ Description: 'Checks for uses a file requiring itself with `require_relative`.'
2052
+ Enabled: pending
2053
+ VersionAdded: '1.22'
2054
+
2010
2055
  Lint/RescueException:
2011
2056
  Description: 'Avoid rescuing the Exception class.'
2012
2057
  StyleGuide: '#no-blind-rescues'
@@ -2536,8 +2581,9 @@ Naming/HeredocDelimiterNaming:
2536
2581
 
2537
2582
  Naming/InclusiveLanguage:
2538
2583
  Description: 'Recommend the use of inclusive language instead of problematic terms.'
2539
- Enabled: pending
2584
+ Enabled: false
2540
2585
  VersionAdded: '1.18'
2586
+ VersionChanged: '1.21'
2541
2587
  CheckIdentifiers: true
2542
2588
  CheckConstants: true
2543
2589
  CheckVariables: true
@@ -2557,6 +2603,7 @@ Naming/InclusiveLanguage:
2557
2603
  - denylist
2558
2604
  - block
2559
2605
  slave:
2606
+ WholeWord: true
2560
2607
  Suggestions: ['replica', 'secondary', 'follower']
2561
2608
 
2562
2609
  Naming/MemoizedInstanceVariableName:
@@ -2692,6 +2739,14 @@ Security/Eval:
2692
2739
  Enabled: true
2693
2740
  VersionAdded: '0.47'
2694
2741
 
2742
+ Security/IoMethods:
2743
+ Description: >-
2744
+ Checks for the first argument to `IO.read`, `IO.binread`, `IO.write`, `IO.binwrite`,
2745
+ `IO.foreach`, and `IO.readlines`.
2746
+ Enabled: pending
2747
+ Safe: false
2748
+ VersionAdded: '1.22'
2749
+
2695
2750
  Security/JSONLoad:
2696
2751
  Description: >-
2697
2752
  Prefer usage of `JSON.parse` over `JSON.load` due to potential
@@ -2768,8 +2823,9 @@ Style/AndOr:
2768
2823
  Description: 'Use &&/|| instead of and/or.'
2769
2824
  StyleGuide: '#no-and-or-or'
2770
2825
  Enabled: true
2826
+ SafeAutoCorrect: false
2771
2827
  VersionAdded: '0.9'
2772
- VersionChanged: '0.25'
2828
+ VersionChanged: '1.21'
2773
2829
  # Whether `and` and `or` are banned only in conditionals (conditionals)
2774
2830
  # or completely (always).
2775
2831
  EnforcedStyle: conditionals
@@ -2803,9 +2859,9 @@ Style/ArrayJoin:
2803
2859
  Style/AsciiComments:
2804
2860
  Description: 'Use only ascii symbols in comments.'
2805
2861
  StyleGuide: '#english-comments'
2806
- Enabled: true
2862
+ Enabled: false
2807
2863
  VersionAdded: '0.9'
2808
- VersionChanged: '0.52'
2864
+ VersionChanged: '1.21'
2809
2865
  AllowedChars:
2810
2866
  - ©
2811
2867
 
@@ -2967,7 +3023,7 @@ Style/CaseEquality:
2967
3023
  Enabled: true
2968
3024
  VersionAdded: '0.9'
2969
3025
  VersionChanged: '0.89'
2970
- # If AllowOnConstant is enabled, the cop will ignore violations when the receiver of
3026
+ # If `AllowOnConstant` option is enabled, the cop will ignore violations when the receiver of
2971
3027
  # the case equality operator is a constant.
2972
3028
  #
2973
3029
  # # bad
@@ -3142,7 +3198,7 @@ Style/CommentAnnotation:
3142
3198
  StyleGuide: '#annotate-keywords'
3143
3199
  Enabled: true
3144
3200
  VersionAdded: '0.10'
3145
- VersionChanged: '1.3'
3201
+ VersionChanged: '1.20'
3146
3202
  Keywords:
3147
3203
  - TODO
3148
3204
  - FIXME
@@ -3155,8 +3211,9 @@ Style/CommentAnnotation:
3155
3211
  Style/CommentedKeyword:
3156
3212
  Description: 'Do not place comments on the same line as certain keywords.'
3157
3213
  Enabled: true
3214
+ SafeAutoCorrect: false
3158
3215
  VersionAdded: '0.51'
3159
- VersionChanged: '1.7'
3216
+ VersionChanged: '1.19'
3160
3217
 
3161
3218
  Style/ConditionalAssignment:
3162
3219
  Description: >-
@@ -3603,8 +3660,9 @@ Style/IdenticalConditionalBranches:
3603
3660
  line at the end of each branch, which can validly be moved
3604
3661
  out of the conditional.
3605
3662
  Enabled: true
3663
+ SafeAutoCorrect: false
3606
3664
  VersionAdded: '0.36'
3607
- VersionChanged: '1.16'
3665
+ VersionChanged: '1.19'
3608
3666
 
3609
3667
  Style/IfInsideElse:
3610
3668
  Description: 'Finds if nodes inside else, which can be converted to elsif.'
@@ -3660,7 +3718,7 @@ Style/InPatternThen:
3660
3718
  Style/InfiniteLoop:
3661
3719
  Description: >-
3662
3720
  Use Kernel#loop for infinite loops.
3663
- This cop is unsafe in the body may raise a `StopIteration` exception.
3721
+ This cop is unsafe if the body may raise a `StopIteration` exception.
3664
3722
  Safe: false
3665
3723
  StyleGuide: '#infinite-loop'
3666
3724
  Enabled: true
@@ -3929,6 +3987,7 @@ Style/MultipleComparison:
3929
3987
  Enabled: true
3930
3988
  VersionAdded: '0.49'
3931
3989
  VersionChanged: '1.1'
3990
+ AllowMethodComparison: true
3932
3991
 
3933
3992
  Style/MutableConstant:
3934
3993
  Description: 'Do not assign mutable objects to constants.'
@@ -4085,6 +4144,21 @@ Style/Not:
4085
4144
  VersionAdded: '0.9'
4086
4145
  VersionChanged: '0.20'
4087
4146
 
4147
+ Style/NumberedParameters:
4148
+ Description: 'Restrict the usage of numbered parameters.'
4149
+ Enabled: pending
4150
+ VersionAdded: '1.22'
4151
+ EnforcedStyle: allow_single_line
4152
+ SupportedStyles:
4153
+ - allow_single_line
4154
+ - disallow
4155
+
4156
+ Style/NumberedParametersLimit:
4157
+ Description: 'Avoid excessive numbered params in a single block.'
4158
+ Enabled: pending
4159
+ VersionAdded: '1.22'
4160
+ Max: 1
4161
+
4088
4162
  Style/NumericLiteralPrefix:
4089
4163
  Description: 'Use smallcase prefixes for numeric literals.'
4090
4164
  StyleGuide: '#numeric-literal-prefixes'
@@ -4095,7 +4169,6 @@ Style/NumericLiteralPrefix:
4095
4169
  - zero_with_o
4096
4170
  - zero_only
4097
4171
 
4098
-
4099
4172
  Style/NumericLiterals:
4100
4173
  Description: >-
4101
4174
  Add underscores to large numeric literals to improve their
@@ -4152,6 +4225,7 @@ Style/OptionHash:
4152
4225
  - args
4153
4226
  - params
4154
4227
  - parameters
4228
+ Allowlist: []
4155
4229
 
4156
4230
  Style/OptionalArguments:
4157
4231
  Description: >-
@@ -4404,12 +4478,19 @@ Style/RedundantSelfAssignment:
4404
4478
  Safe: false
4405
4479
  VersionAdded: '0.90'
4406
4480
 
4481
+ Style/RedundantSelfAssignmentBranch:
4482
+ Description: 'Checks for places where conditional branch makes redundant self-assignment.'
4483
+ Enabled: pending
4484
+ VersionAdded: '1.19'
4485
+
4407
4486
  Style/RedundantSort:
4408
4487
  Description: >-
4409
4488
  Use `min` instead of `sort.first`,
4410
4489
  `max_by` instead of `sort_by...last`, etc.
4411
4490
  Enabled: true
4412
4491
  VersionAdded: '0.76'
4492
+ VersionChanged: '1.22'
4493
+ Safe: false
4413
4494
 
4414
4495
  Style/RedundantSortBy:
4415
4496
  Description: 'Use `sort` instead of `sort_by { |x| x }`.'
@@ -4490,6 +4571,12 @@ Style/Sample:
4490
4571
  Enabled: true
4491
4572
  VersionAdded: '0.30'
4492
4573
 
4574
+ Style/SelectByRegexp:
4575
+ Description: 'Prefer grep/grep_v to select/reject with a regexp match.'
4576
+ Enabled: pending
4577
+ SafeAutoCorrect: false
4578
+ VersionAdded: '1.22'
4579
+
4493
4580
  Style/SelfAssignment:
4494
4581
  Description: >-
4495
4582
  Checks for places where self-assignment shorthand should have
@@ -4575,6 +4662,7 @@ Style/SpecialGlobalVars:
4575
4662
  VersionAdded: '0.13'
4576
4663
  VersionChanged: '0.36'
4577
4664
  SafeAutoCorrect: false
4665
+ RequireEnglish: true
4578
4666
  EnforcedStyle: use_english_names
4579
4667
  SupportedStyles:
4580
4668
  - use_perl_names
@@ -4675,8 +4763,9 @@ Style/StructInheritance:
4675
4763
  Description: 'Checks for inheritance from Struct.new.'
4676
4764
  StyleGuide: '#no-extend-struct-new'
4677
4765
  Enabled: true
4766
+ SafeAutoCorrect: false
4678
4767
  VersionAdded: '0.29'
4679
- VersionChanged: '0.86'
4768
+ VersionChanged: '1.20'
4680
4769
 
4681
4770
  Style/SwapValues:
4682
4771
  Description: 'This cop enforces the use of shorthand-style swapping of 2 variables.'
@@ -4895,7 +4984,7 @@ Style/VariableInterpolation:
4895
4984
 
4896
4985
  Style/WhenThen:
4897
4986
  Description: 'Use when x then ... for one-line cases.'
4898
- StyleGuide: '#one-line-cases'
4987
+ StyleGuide: '#no-when-semicolons'
4899
4988
  Enabled: true
4900
4989
  VersionAdded: '0.9'
4901
4990
 
@@ -4919,7 +5008,7 @@ Style/WordArray:
4919
5008
  StyleGuide: '#percent-w'
4920
5009
  Enabled: true
4921
5010
  VersionAdded: '0.9'
4922
- VersionChanged: '0.36'
5011
+ VersionChanged: '1.19'
4923
5012
  EnforcedStyle: percent
4924
5013
  SupportedStyles:
4925
5014
  # percent style: %w(word1 word2)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Chefstyle
3
- VERSION = "2.0.6"
4
- RUBOCOP_VERSION = "1.18.3"
3
+ VERSION = "2.1.0"
4
+ RUBOCOP_VERSION = "1.22.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: 2.0.6
4
+ version: 2.1.0
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: 2021-07-06 00:00:00.000000000 Z
11
+ date: 2021-09-30 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.18.3
19
+ version: 1.22.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.18.3
26
+ version: 1.22.0
27
27
  description:
28
28
  email:
29
29
  - oss@chef.io