chefstyle 2.1.0 → 2.2.0

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: 3fd3b7ee2c2b897278e81858af450a48fa72bac1e64fdc60f09a4f419b3b5588
4
- data.tar.gz: 7553f506631f741900f40872727ec2a0f6c3abfc8a0b1ba00947dd2c4546ce6b
3
+ metadata.gz: 1df2843e644a1b1139c96e89e1298cce7d3317f80c09d831217eb05142adf515
4
+ data.tar.gz: c014bea9e55b69bba12311b8538b53789dcd4291526c88ef8c9768a531521969
5
5
  SHA512:
6
- metadata.gz: ab3cbc02ed9987b77d29206938e2dac4f1ce1e4c84cf60013b3dd2f3b998e7531cb935e91b972d865ba6ba2cb1d51c7116ac8abf7b74db9402dec088b721353c
7
- data.tar.gz: a24689342db2bdeb3717e812314bffdd369690d68d94332abd885dd0ea108f7f96f3f9b47779c976938fc94788a5141621fe8a83912bb0665f6647bef9e9c5a0
6
+ metadata.gz: b61bc11764072271c06cf664e7dfb727488aba808a5f5b0801d7ebc8046fbe0bcba10ab655df56b918a57b745724b21d78a5826088f5cda32754e9e1474e9017
7
+ data.tar.gz: '096297a185924e121bae9eea0423911573ace2432d21aaec712db7a7006a55c1c27798f3aa8ddf4d2d1825605cc820a5567033682879fc68875b3974c452a7a3'
@@ -19,6 +19,8 @@ Gemspec/DuplicatedAssignment:
19
19
  Enabled: false
20
20
  Gemspec/OrderedDependencies:
21
21
  Enabled: false
22
+ Gemspec/RequireMFA:
23
+ Enabled: false
22
24
  Gemspec/RequiredRubyVersion:
23
25
  Enabled: false
24
26
  Gemspec/RubyVersionGlobalsUsage:
@@ -459,6 +461,8 @@ Lint/UselessElseWithoutRescue:
459
461
  Enabled: false
460
462
  Lint/UselessMethodDefinition:
461
463
  Enabled: false
464
+ Lint/UselessRuby2Keywords:
465
+ Enabled: false
462
466
  Lint/UselessSetterCall:
463
467
  Enabled: false
464
468
  Lint/UselessTimes:
@@ -487,6 +491,8 @@ Naming/AccessorMethodName:
487
491
  Enabled: false
488
492
  Naming/AsciiIdentifiers:
489
493
  Enabled: false
494
+ Naming/BlockForwarding:
495
+ Enabled: false
490
496
  Naming/BlockParameterName:
491
497
  Enabled: false
492
498
  Naming/ClassAndModuleCamelCase:
@@ -637,6 +643,10 @@ Style/ExplicitBlockArgument:
637
643
  Enabled: false
638
644
  Style/ExponentialNotation:
639
645
  Enabled: false
646
+ Style/FileRead:
647
+ Enabled: false
648
+ Style/FileWrite:
649
+ Enabled: false
640
650
  Style/FloatDivision:
641
651
  Enabled: false
642
652
  Style/For:
@@ -701,6 +711,8 @@ Style/LambdaCall:
701
711
  Enabled: false
702
712
  Style/LineEndConcatenation:
703
713
  Enabled: false
714
+ Style/MapToHash:
715
+ Enabled: false
704
716
  Style/MethodCallWithoutArgsParentheses:
705
717
  Enabled: false
706
718
  Style/MethodCallWithArgsParentheses:
@@ -709,6 +721,8 @@ Style/MultilineInPatternThen:
709
721
  Enabled: false
710
722
  Style/NumberedParameters:
711
723
  Enabled: false
724
+ Style/OpenStructUse:
725
+ Enabled: false
712
726
  Style/RedundantAssignment:
713
727
  Enabled: false
714
728
  Style/RedundantFetchBlock:
data/config/upstream.yml CHANGED
@@ -78,6 +78,8 @@ AllCops:
78
78
  # When specifying style guide URLs, any paths and/or fragments will be
79
79
  # evaluated relative to the base URL.
80
80
  StyleGuideBaseURL: https://rubystyle.guide
81
+ # Documentation URLs will be constructed using the base URL.
82
+ DocumentationBaseURL: https://docs.rubocop.org/rubocop
81
83
  # Extra details are not displayed in offense messages by default. Change
82
84
  # behavior by overriding ExtraDetails, or by giving the
83
85
  # `-E/--extra-details` option.
@@ -150,6 +152,7 @@ AllCops:
150
152
  rubocop-minitest: [minitest]
151
153
  rubocop-sequel: [sequel]
152
154
  rubocop-rake: [rake]
155
+ rubocop-graphql: [graphql]
153
156
 
154
157
  #################### Bundler ###############################
155
158
 
@@ -258,11 +261,20 @@ Gemspec/OrderedDependencies:
258
261
  Include:
259
262
  - '**/*.gemspec'
260
263
 
264
+ Gemspec/RequireMFA:
265
+ Description: 'Checks that the gemspec has metadata to require MFA from RubyGems.'
266
+ Enabled: pending
267
+ VersionAdded: '1.23'
268
+ Reference:
269
+ - https://guides.rubygems.org/mfa-requirement-opt-in/
270
+ Include:
271
+ - '**/*.gemspec'
272
+
261
273
  Gemspec/RequiredRubyVersion:
262
274
  Description: 'Checks that `required_ruby_version` of gemspec is specified and equal to `TargetRubyVersion` of .rubocop.yml.'
263
275
  Enabled: true
264
276
  VersionAdded: '0.52'
265
- VersionChanged: '0.89'
277
+ VersionChanged: '1.22'
266
278
  Include:
267
279
  - '**/*.gemspec'
268
280
 
@@ -439,7 +451,11 @@ Layout/ClosingParenthesisIndentation:
439
451
  Layout/CommentIndentation:
440
452
  Description: 'Indentation of comments.'
441
453
  Enabled: true
454
+ # When true, allows comments to have extra indentation if that aligns them
455
+ # with a comment on the preceding line.
456
+ AllowForAlignment: false
442
457
  VersionAdded: '0.49'
458
+ VersionChanged: '1.24'
443
459
 
444
460
  Layout/ConditionPosition:
445
461
  Description: >-
@@ -511,13 +527,13 @@ Layout/EmptyLineBetweenDefs:
511
527
  StyleGuide: '#empty-lines-between-methods'
512
528
  Enabled: true
513
529
  VersionAdded: '0.49'
514
- VersionChanged: '1.7'
530
+ VersionChanged: '1.23'
515
531
  EmptyLineBetweenMethodDefs: true
516
532
  EmptyLineBetweenClassDefs: true
517
533
  EmptyLineBetweenModuleDefs: true
518
- # If `true`, this parameter means that single line method definitions don't
519
- # need an empty line between them.
520
- AllowAdjacentOneLineDefs: false
534
+ # `AllowAdjacentOneLineDefs` means that single line method definitions don't
535
+ # need an empty line between them. `true` by default.
536
+ AllowAdjacentOneLineDefs: true
521
537
  # Can be array to specify minimum and maximum number of empty lines, e.g. [1, 2]
522
538
  NumberOfEmptyLines: 1
523
539
 
@@ -1568,6 +1584,7 @@ Lint/DeprecatedConstants:
1568
1584
  Description: 'Checks for deprecated constants.'
1569
1585
  Enabled: pending
1570
1586
  VersionAdded: '1.8'
1587
+ VersionChanged: '1.22'
1571
1588
  # You can configure deprecated constants.
1572
1589
  # If there is an alternative method, you can set alternative value as `Alternative`.
1573
1590
  # And you can set the deprecated version as `DeprecatedVersion`.
@@ -1588,6 +1605,9 @@ Lint/DeprecatedConstants:
1588
1605
  'FALSE':
1589
1606
  Alternative: 'false'
1590
1607
  DeprecatedVersion: '2.4'
1608
+ 'Net::HTTPServerException':
1609
+ Alternative: 'Net::HTTPClientException'
1610
+ DeprecatedVersion: '2.6'
1591
1611
  'Random::DEFAULT':
1592
1612
  Alternative: 'Random.new'
1593
1613
  DeprecatedVersion: '3.0'
@@ -1782,7 +1802,9 @@ Lint/ImplicitStringConcatenation:
1782
1802
  Lint/IncompatibleIoSelectWithFiberScheduler:
1783
1803
  Description: 'Checks for `IO.select` that is incompatible with Fiber Scheduler.'
1784
1804
  Enabled: pending
1805
+ SafeAutoCorrect: false
1785
1806
  VersionAdded: '1.21'
1807
+ VersionChanged: '1.24'
1786
1808
 
1787
1809
  Lint/IneffectiveAccessModifier:
1788
1810
  Description: >-
@@ -2304,6 +2326,11 @@ Lint/UselessMethodDefinition:
2304
2326
  Safe: false
2305
2327
  AllowComments: true
2306
2328
 
2329
+ Lint/UselessRuby2Keywords:
2330
+ Description: 'Finds unnecessary uses of `ruby2_keywords`.'
2331
+ Enabled: pending
2332
+ VersionAdded: '1.23'
2333
+
2307
2334
  Lint/UselessSetterCall:
2308
2335
  Description: 'Checks for useless setter call to a local variable.'
2309
2336
  Enabled: true
@@ -2460,6 +2487,16 @@ Naming/BinaryOperatorParameterName:
2460
2487
  VersionAdded: '0.50'
2461
2488
  VersionChanged: '1.2'
2462
2489
 
2490
+ Naming/BlockForwarding:
2491
+ Description: 'Use anonymous block forwarding.'
2492
+ StyleGuide: '#block-forwarding'
2493
+ Enabled: pending
2494
+ VersionAdded: '1.24'
2495
+ EnforcedStyle: anonymous
2496
+ SupportedStyles:
2497
+ - anonymous
2498
+ - explicit
2499
+
2463
2500
  Naming/BlockParameterName:
2464
2501
  Description: >-
2465
2502
  Checks for block parameter names that contain capital letters,
@@ -2497,6 +2534,7 @@ Naming/FileName:
2497
2534
  StyleGuide: '#snake-case-files'
2498
2535
  Enabled: true
2499
2536
  VersionAdded: '0.50'
2537
+ VersionChanged: '1.23'
2500
2538
  # Camel case file names listed in `AllCops:Include` and all file names listed
2501
2539
  # in `AllCops:Exclude` are excluded by default. Add extra excludes here.
2502
2540
  Exclude: []
@@ -2509,6 +2547,13 @@ Naming/FileName:
2509
2547
  # whether each source file's class or module name matches the file name --
2510
2548
  # not whether the nested module hierarchy matches the subdirectory path.
2511
2549
  CheckDefinitionPathHierarchy: true
2550
+ # paths that are considered root directories, for example "lib" in most ruby projects
2551
+ # or "app/models" in rails projects
2552
+ CheckDefinitionPathHierarchyRoots:
2553
+ - lib
2554
+ - spec
2555
+ - test
2556
+ - src
2512
2557
  # If non-`nil`, expect all source file names to match the following regex.
2513
2558
  # Only the file name itself is matched, not the entire file path.
2514
2559
  # Use anchors as necessary if you want to match the entire name rather than
@@ -2754,10 +2799,9 @@ Security/JSONLoad:
2754
2799
  Reference: 'https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html#method-i-load'
2755
2800
  Enabled: true
2756
2801
  VersionAdded: '0.43'
2757
- VersionChanged: '0.44'
2802
+ VersionChanged: '1.22'
2758
2803
  # Autocorrect here will change to a method that may cause crashes depending
2759
2804
  # on the value of the argument.
2760
- AutoCorrect: false
2761
2805
  SafeAutoCorrect: false
2762
2806
 
2763
2807
  Security/MarshalLoad:
@@ -3466,6 +3510,18 @@ Style/ExponentialNotation:
3466
3510
  - engineering
3467
3511
  - integral
3468
3512
 
3513
+ Style/FileRead:
3514
+ Description: 'Favor `File.(bin)read` convenience methods.'
3515
+ StyleGuide: '#file-read'
3516
+ Enabled: pending
3517
+ VersionAdded: '1.24'
3518
+
3519
+ Style/FileWrite:
3520
+ Description: 'Favor `File.(bin)write` convenience methods.'
3521
+ StyleGuide: '#file-write'
3522
+ Enabled: pending
3523
+ VersionAdded: '1.24'
3524
+
3469
3525
  Style/FloatDivision:
3470
3526
  Description: 'For performing float division, coerce one side only.'
3471
3527
  StyleGuide: '#float-division'
@@ -3624,7 +3680,7 @@ Style/HashSyntax:
3624
3680
  StyleGuide: '#hash-literals'
3625
3681
  Enabled: true
3626
3682
  VersionAdded: '0.9'
3627
- VersionChanged: '0.43'
3683
+ VersionChanged: '1.24'
3628
3684
  EnforcedStyle: ruby19
3629
3685
  SupportedStyles:
3630
3686
  # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys
@@ -3635,6 +3691,13 @@ Style/HashSyntax:
3635
3691
  - no_mixed_keys
3636
3692
  # enforces both ruby19 and no_mixed_keys styles
3637
3693
  - ruby19_no_mixed_keys
3694
+ # Force hashes that have a hash value omission
3695
+ EnforcedShorthandSyntax: always
3696
+ SupportedShorthandSyntax:
3697
+ # forces use of the 3.1 syntax (e.g. {foo:}) when the hash key and value are the same.
3698
+ - always
3699
+ # forces use of explicit hash literal value.
3700
+ - never
3638
3701
  # Force hashes that have a symbol value to use hash rockets
3639
3702
  UseHashRocketsWithSymbolValues: false
3640
3703
  # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style
@@ -3811,6 +3874,12 @@ Style/LineEndConcatenation:
3811
3874
  VersionAdded: '0.18'
3812
3875
  VersionChanged: '0.64'
3813
3876
 
3877
+ Style/MapToHash:
3878
+ Description: 'Prefer `to_h` with a block over `map.to_h`.'
3879
+ Enabled: pending
3880
+ VersionAdded: '1.24'
3881
+ Safe: false
3882
+
3814
3883
  Style/MethodCallWithArgsParentheses:
3815
3884
  Description: 'Use parentheses for method calls with arguments.'
3816
3885
  StyleGuide: '#method-invocation-parens'
@@ -4179,6 +4248,8 @@ Style/NumericLiterals:
4179
4248
  VersionChanged: '0.48'
4180
4249
  MinDigits: 5
4181
4250
  Strict: false
4251
+ # You can specify allowed numbers. (e.g. port number 3000, 8080, and etc)
4252
+ AllowedNumbers: []
4182
4253
 
4183
4254
  Style/NumericPredicate:
4184
4255
  Description: >-
@@ -4213,6 +4284,16 @@ Style/OneLineConditional:
4213
4284
  VersionAdded: '0.9'
4214
4285
  VersionChanged: '0.90'
4215
4286
 
4287
+ Style/OpenStructUse:
4288
+ Description: >-
4289
+ Avoid using OpenStruct. As of Ruby 3.0, use is officially discouraged due to performance,
4290
+ version compatibility, and potential security issues.
4291
+ Reference:
4292
+ - https://docs.ruby-lang.org/en/3.0.0/OpenStruct.html#class-OpenStruct-label-Caveats
4293
+
4294
+ Enabled: pending
4295
+ VersionAdded: '1.23'
4296
+
4216
4297
  Style/OptionHash:
4217
4298
  Description: "Don't use option hashes when you can use keyword arguments."
4218
4299
  Enabled: false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Chefstyle
3
- VERSION = "2.1.0"
4
- RUBOCOP_VERSION = "1.22.0"
3
+ VERSION = "2.2.0"
4
+ RUBOCOP_VERSION = "1.24.1"
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.1.0
4
+ version: 2.2.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-09-30 00:00:00.000000000 Z
11
+ date: 2022-01-01 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.22.0
19
+ version: 1.24.1
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.22.0
26
+ version: 1.24.1
27
27
  description:
28
28
  email:
29
29
  - oss@chef.io