chefstyle 2.0.8 → 2.1.2

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: 9ee9ad884af7ff3d70fc95dd97e401ec9d15ab69c38553a7b027032555a6d715
4
- data.tar.gz: 7e661590446cc0df5bae5f9fb962bc49576994edb73f293bda94714d089b55a6
3
+ metadata.gz: 807f2b480f727abd6c611d64e6dfe42dde84a51561130f4d875a65cf36d2e873
4
+ data.tar.gz: 47afd158a306d3fa87e22f4f7343ef0a3bad7aec5a3397c29e3c8cae7ef3f414
5
5
  SHA512:
6
- metadata.gz: 29102b071f07ea768bb20516b5de1474b1d615111156513fa9804fa21f1da668cdaae0fa9f52758323b01f65d6db7b5a7d58c500356c403496240108e16b32a7
7
- data.tar.gz: 5f8d653cd7b5811937ffd736bb5af468699f0ca3276bc7c92fe8d88683b97ff4339f0f52c6772ea9f0d2fffe414824ae4436b81655b705e85d99668f0276c434
6
+ metadata.gz: bb8d08252c5f5993270ae5ef62e47d36887b6703a2f9c3fac6d3b517bf78be8d037c3381da8fbd38a4afa5b4f83afae73fab300b5cdde17dec287232d6456af6
7
+ data.tar.gz: 629902b61042ac71e9387eab6c39ee5cf4f4216f9caa61a8d77bd7321e76b19ff99b2869530f83257b6cb74cc56930a58faee664f24dc2f49caf0ecfcbbc0a59
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,8 @@ Lint/AmbiguousBlockAssociation:
219
221
  Enabled: false
220
222
  Lint/AmbiguousOperator:
221
223
  Enabled: false
224
+ Lint/AmbiguousOperatorPrecedence:
225
+ Enabled: false
222
226
  Lint/AmbiguousRange:
223
227
  Enabled: false
224
228
  Lint/AmbiguousRegexpLiteral:
@@ -305,10 +309,12 @@ Lint/IdentityComparison:
305
309
  Enabled: false
306
310
  Lint/ImplicitStringConcatenation:
307
311
  Enabled: false
308
- Lint/InheritException:
312
+ Lint/IncompatibleIoSelectWithFiberScheduler:
309
313
  Enabled: false
310
314
  Lint/IneffectiveAccessModifier:
311
315
  Enabled: false
316
+ Lint/InheritException:
317
+ Enabled: false
312
318
  Lint/InterpolationCheck:
313
319
  Enabled: false
314
320
  Lint/LambdaWithoutLiteralBlock:
@@ -381,6 +387,8 @@ Lint/RegexpAsCondition:
381
387
  Enabled: false
382
388
  Lint/RequireParentheses:
383
389
  Enabled: false
390
+ Lint/RequireRelativeSelfPath:
391
+ Enabled: false
384
392
  Lint/RescueException:
385
393
  Enabled: false
386
394
  Lint/RescueType:
@@ -699,6 +707,8 @@ Style/MethodCallWithArgsParentheses:
699
707
  Enabled: false
700
708
  Style/MultilineInPatternThen:
701
709
  Enabled: false
710
+ Style/NumberedParameters:
711
+ Enabled: false
702
712
  Style/RedundantAssignment:
703
713
  Enabled: false
704
714
  Style/RedundantFetchBlock:
@@ -771,6 +781,8 @@ Style/NonNilCheck:
771
781
  Enabled: false
772
782
  Style/Not:
773
783
  Enabled: false
784
+ Style/NumberedParametersLimit:
785
+ Enabled: false
774
786
  Style/NumericLiterals:
775
787
  Enabled: false
776
788
  Style/NumericLiteralPrefix:
@@ -851,6 +863,8 @@ Style/SafeNavigation:
851
863
  Enabled: false
852
864
  Style/Sample:
853
865
  Enabled: false
866
+ Style/SelectByRegexp:
867
+ Enabled: false
854
868
  Style/SelfAssignment:
855
869
  Enabled: false
856
870
  Style/Semicolon:
@@ -943,6 +957,8 @@ Style/ZeroLengthPredicate:
943
957
  Enabled: false
944
958
  Security/Eval:
945
959
  Enabled: false
960
+ Security/IoMethods:
961
+ Enabled: false
946
962
  Security/JSONLoad:
947
963
  Enabled: false
948
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'
@@ -247,7 +262,7 @@ Gemspec/RequiredRubyVersion:
247
262
  Description: 'Checks that `required_ruby_version` of gemspec is specified and equal to `TargetRubyVersion` of .rubocop.yml.'
248
263
  Enabled: true
249
264
  VersionAdded: '0.52'
250
- VersionChanged: '0.89'
265
+ VersionChanged: '1.22'
251
266
  Include:
252
267
  - '**/*.gemspec'
253
268
 
@@ -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,13 @@ 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
+
1437
1459
  Lint/AmbiguousRange:
1438
1460
  Description: Checks for ranges with ambiguous boundaries.
1439
1461
  Enabled: pending
@@ -1471,9 +1493,9 @@ Lint/BinaryOperatorWithIdenticalOperands:
1471
1493
  Lint/BooleanSymbol:
1472
1494
  Description: 'Check for `:true` and `:false` symbols.'
1473
1495
  Enabled: true
1474
- Safe: false
1496
+ SafeAutoCorrect: false
1475
1497
  VersionAdded: '0.50'
1476
- VersionChanged: '0.83'
1498
+ VersionChanged: '1.22'
1477
1499
 
1478
1500
  Lint/CircularArgumentReference:
1479
1501
  Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
@@ -1519,6 +1541,11 @@ Lint/Debugger:
1519
1541
  Capybara:
1520
1542
  - save_and_open_page
1521
1543
  - save_and_open_screenshot
1544
+ debug.rb:
1545
+ - binding.b
1546
+ - binding.break
1547
+ - Kernel.binding.b
1548
+ - Kernel.binding.break
1522
1549
  Pry:
1523
1550
  - binding.pry
1524
1551
  - binding.remote_pry
@@ -1527,6 +1554,8 @@ Lint/Debugger:
1527
1554
  Rails:
1528
1555
  - debugger
1529
1556
  - Kernel.debugger
1557
+ RubyJard:
1558
+ - jard
1530
1559
  WebConsole:
1531
1560
  - binding.console
1532
1561
 
@@ -1539,6 +1568,7 @@ Lint/DeprecatedConstants:
1539
1568
  Description: 'Checks for deprecated constants.'
1540
1569
  Enabled: pending
1541
1570
  VersionAdded: '1.8'
1571
+ VersionChanged: '1.22'
1542
1572
  # You can configure deprecated constants.
1543
1573
  # If there is an alternative method, you can set alternative value as `Alternative`.
1544
1574
  # And you can set the deprecated version as `DeprecatedVersion`.
@@ -1559,6 +1589,9 @@ Lint/DeprecatedConstants:
1559
1589
  'FALSE':
1560
1590
  Alternative: 'false'
1561
1591
  DeprecatedVersion: '2.4'
1592
+ 'Net::HTTPServerException':
1593
+ Alternative: 'Net::HTTPClientException'
1594
+ DeprecatedVersion: '2.6'
1562
1595
  'Random::DEFAULT':
1563
1596
  Alternative: 'Random.new'
1564
1597
  DeprecatedVersion: '3.0'
@@ -1750,6 +1783,11 @@ Lint/ImplicitStringConcatenation:
1750
1783
  Enabled: true
1751
1784
  VersionAdded: '0.36'
1752
1785
 
1786
+ Lint/IncompatibleIoSelectWithFiberScheduler:
1787
+ Description: 'Checks for `IO.select` that is incompatible with Fiber Scheduler.'
1788
+ Enabled: pending
1789
+ VersionAdded: '1.21'
1790
+
1753
1791
  Lint/IneffectiveAccessModifier:
1754
1792
  Description: >-
1755
1793
  Checks for attempts to use `private` or `protected` to set
@@ -2013,6 +2051,11 @@ Lint/RequireParentheses:
2013
2051
  Enabled: true
2014
2052
  VersionAdded: '0.18'
2015
2053
 
2054
+ Lint/RequireRelativeSelfPath:
2055
+ Description: 'Checks for uses a file requiring itself with `require_relative`.'
2056
+ Enabled: pending
2057
+ VersionAdded: '1.22'
2058
+
2016
2059
  Lint/RescueException:
2017
2060
  Description: 'Avoid rescuing the Exception class.'
2018
2061
  StyleGuide: '#no-blind-rescues'
@@ -2542,8 +2585,9 @@ Naming/HeredocDelimiterNaming:
2542
2585
 
2543
2586
  Naming/InclusiveLanguage:
2544
2587
  Description: 'Recommend the use of inclusive language instead of problematic terms.'
2545
- Enabled: pending
2588
+ Enabled: false
2546
2589
  VersionAdded: '1.18'
2590
+ VersionChanged: '1.21'
2547
2591
  CheckIdentifiers: true
2548
2592
  CheckConstants: true
2549
2593
  CheckVariables: true
@@ -2699,6 +2743,14 @@ Security/Eval:
2699
2743
  Enabled: true
2700
2744
  VersionAdded: '0.47'
2701
2745
 
2746
+ Security/IoMethods:
2747
+ Description: >-
2748
+ Checks for the first argument to `IO.read`, `IO.binread`, `IO.write`, `IO.binwrite`,
2749
+ `IO.foreach`, and `IO.readlines`.
2750
+ Enabled: pending
2751
+ Safe: false
2752
+ VersionAdded: '1.22'
2753
+
2702
2754
  Security/JSONLoad:
2703
2755
  Description: >-
2704
2756
  Prefer usage of `JSON.parse` over `JSON.load` due to potential
@@ -2706,10 +2758,9 @@ Security/JSONLoad:
2706
2758
  Reference: 'https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html#method-i-load'
2707
2759
  Enabled: true
2708
2760
  VersionAdded: '0.43'
2709
- VersionChanged: '0.44'
2761
+ VersionChanged: '1.22'
2710
2762
  # Autocorrect here will change to a method that may cause crashes depending
2711
2763
  # on the value of the argument.
2712
- AutoCorrect: false
2713
2764
  SafeAutoCorrect: false
2714
2765
 
2715
2766
  Security/MarshalLoad:
@@ -2775,8 +2826,9 @@ Style/AndOr:
2775
2826
  Description: 'Use &&/|| instead of and/or.'
2776
2827
  StyleGuide: '#no-and-or-or'
2777
2828
  Enabled: true
2829
+ SafeAutoCorrect: false
2778
2830
  VersionAdded: '0.9'
2779
- VersionChanged: '0.25'
2831
+ VersionChanged: '1.21'
2780
2832
  # Whether `and` and `or` are banned only in conditionals (conditionals)
2781
2833
  # or completely (always).
2782
2834
  EnforcedStyle: conditionals
@@ -2810,9 +2862,9 @@ Style/ArrayJoin:
2810
2862
  Style/AsciiComments:
2811
2863
  Description: 'Use only ascii symbols in comments.'
2812
2864
  StyleGuide: '#english-comments'
2813
- Enabled: true
2865
+ Enabled: false
2814
2866
  VersionAdded: '0.9'
2815
- VersionChanged: '0.52'
2867
+ VersionChanged: '1.21'
2816
2868
  AllowedChars:
2817
2869
  - ©
2818
2870
 
@@ -2974,7 +3026,7 @@ Style/CaseEquality:
2974
3026
  Enabled: true
2975
3027
  VersionAdded: '0.9'
2976
3028
  VersionChanged: '0.89'
2977
- # If AllowOnConstant is enabled, the cop will ignore violations when the receiver of
3029
+ # If `AllowOnConstant` option is enabled, the cop will ignore violations when the receiver of
2978
3030
  # the case equality operator is a constant.
2979
3031
  #
2980
3032
  # # bad
@@ -3149,7 +3201,7 @@ Style/CommentAnnotation:
3149
3201
  StyleGuide: '#annotate-keywords'
3150
3202
  Enabled: true
3151
3203
  VersionAdded: '0.10'
3152
- VersionChanged: '1.3'
3204
+ VersionChanged: '1.20'
3153
3205
  Keywords:
3154
3206
  - TODO
3155
3207
  - FIXME
@@ -3669,7 +3721,7 @@ Style/InPatternThen:
3669
3721
  Style/InfiniteLoop:
3670
3722
  Description: >-
3671
3723
  Use Kernel#loop for infinite loops.
3672
- This cop is unsafe in the body may raise a `StopIteration` exception.
3724
+ This cop is unsafe if the body may raise a `StopIteration` exception.
3673
3725
  Safe: false
3674
3726
  StyleGuide: '#infinite-loop'
3675
3727
  Enabled: true
@@ -4095,6 +4147,21 @@ Style/Not:
4095
4147
  VersionAdded: '0.9'
4096
4148
  VersionChanged: '0.20'
4097
4149
 
4150
+ Style/NumberedParameters:
4151
+ Description: 'Restrict the usage of numbered parameters.'
4152
+ Enabled: pending
4153
+ VersionAdded: '1.22'
4154
+ EnforcedStyle: allow_single_line
4155
+ SupportedStyles:
4156
+ - allow_single_line
4157
+ - disallow
4158
+
4159
+ Style/NumberedParametersLimit:
4160
+ Description: 'Avoid excessive numbered params in a single block.'
4161
+ Enabled: pending
4162
+ VersionAdded: '1.22'
4163
+ Max: 1
4164
+
4098
4165
  Style/NumericLiteralPrefix:
4099
4166
  Description: 'Use smallcase prefixes for numeric literals.'
4100
4167
  StyleGuide: '#numeric-literal-prefixes'
@@ -4105,7 +4172,6 @@ Style/NumericLiteralPrefix:
4105
4172
  - zero_with_o
4106
4173
  - zero_only
4107
4174
 
4108
-
4109
4175
  Style/NumericLiterals:
4110
4176
  Description: >-
4111
4177
  Add underscores to large numeric literals to improve their
@@ -4426,6 +4492,8 @@ Style/RedundantSort:
4426
4492
  `max_by` instead of `sort_by...last`, etc.
4427
4493
  Enabled: true
4428
4494
  VersionAdded: '0.76'
4495
+ VersionChanged: '1.22'
4496
+ Safe: false
4429
4497
 
4430
4498
  Style/RedundantSortBy:
4431
4499
  Description: 'Use `sort` instead of `sort_by { |x| x }`.'
@@ -4506,6 +4574,12 @@ Style/Sample:
4506
4574
  Enabled: true
4507
4575
  VersionAdded: '0.30'
4508
4576
 
4577
+ Style/SelectByRegexp:
4578
+ Description: 'Prefer grep/grep_v to select/reject with a regexp match.'
4579
+ Enabled: pending
4580
+ SafeAutoCorrect: false
4581
+ VersionAdded: '1.22'
4582
+
4509
4583
  Style/SelfAssignment:
4510
4584
  Description: >-
4511
4585
  Checks for places where self-assignment shorthand should have
@@ -4692,8 +4766,9 @@ Style/StructInheritance:
4692
4766
  Description: 'Checks for inheritance from Struct.new.'
4693
4767
  StyleGuide: '#no-extend-struct-new'
4694
4768
  Enabled: true
4769
+ SafeAutoCorrect: false
4695
4770
  VersionAdded: '0.29'
4696
- VersionChanged: '0.86'
4771
+ VersionChanged: '1.20'
4697
4772
 
4698
4773
  Style/SwapValues:
4699
4774
  Description: 'This cop enforces the use of shorthand-style swapping of 2 variables.'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Chefstyle
3
- VERSION = "2.0.8"
4
- RUBOCOP_VERSION = "1.19.0"
3
+ VERSION = "2.1.2"
4
+ RUBOCOP_VERSION = "1.22.3"
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.8
4
+ version: 2.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: 2021-08-12 00:00:00.000000000 Z
11
+ date: 2021-10-27 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.19.0
19
+ version: 1.22.3
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.19.0
26
+ version: 1.22.3
27
27
  description:
28
28
  email:
29
29
  - oss@chef.io