chefstyle 2.0.3 → 2.0.7

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: cfaf550a90523d1a1e85918799f651126cd16bb603107f9b7a9937dca76ef09e
4
- data.tar.gz: 24f53e6cbb1c4a98b7fe26a1df6daec6ecb7f91e42433743e0a2335abfadc186
3
+ metadata.gz: 537da958746d041d67b89ee26d47e0e882ae07c7bdddba3a8b603fdc4d784862
4
+ data.tar.gz: e5dac7ce94ca535bbc9a07ed645745a65c822587a0d99b5f0146e4518ea1ff32
5
5
  SHA512:
6
- metadata.gz: 61a9ebc0f97446ca07997fc1c1ffebbbbb05b31d2e9f59fcad330fcbe356c78f324f1c616fe79cc2020abdf6133df009c9b6da350bcabf2840d11c51a19c8a02
7
- data.tar.gz: 1a09934e30e114355c09e32314a9647fe065ace54acfb0ac38f9b680a15e7ef029585632eb3eaf9afb90982b655ff9a8d0c65b024f4e6c8932c853c79af08945
6
+ metadata.gz: 218d5483d959897216b6ed7998d3682a888826f3c2f8c479dcb4f46d862ce3e075d9178da249bf25cc4cb749a76bdaa65ab4f4da4b94c083aef0cd75e4121310
7
+ data.tar.gz: 76add27751122b899a6575ea6f5274784cacfb2fb318432b447274335687d5d292e3b412dcc41260548da9c06ce6a1819d268dac9558ec5c99af655ed54c1785
@@ -123,6 +123,8 @@ Layout/LeadingCommentSpace:
123
123
  Enabled: false
124
124
  Layout/LeadingEmptyLines:
125
125
  Enabled: false
126
+ Layout/LineEndStringConcatenationIndentation:
127
+ Enabled: false
126
128
  Layout/LineLength:
127
129
  Enabled: false
128
130
  Layout/MultilineArrayBraceLayout:
@@ -275,6 +277,8 @@ Lint/EmptyExpression:
275
277
  Enabled: false
276
278
  Lint/EmptyFile:
277
279
  Enabled: false
280
+ Lint/EmptyInPattern:
281
+ Enabled: false
278
282
  Lint/EmptyInterpolation:
279
283
  Enabled: false
280
284
  Lint/EmptyWhen:
@@ -485,6 +489,8 @@ Naming/HeredocDelimiterCase:
485
489
  Enabled: false
486
490
  Naming/HeredocDelimiterNaming:
487
491
  Enabled: false
492
+ Naming/InclusiveLanguage:
493
+ Enabled: false
488
494
  Naming/MemoizedInstanceVariableName:
489
495
  Enabled: false
490
496
  Naming/MethodName:
@@ -667,6 +673,8 @@ Style/IfWithSemicolon:
667
673
  Enabled: false
668
674
  Style/ImplicitRuntimeError:
669
675
  Enabled: false
676
+ Style/InPatternThen:
677
+ Enabled: false
670
678
  Style/InfiniteLoop:
671
679
  Enabled: false
672
680
  Style/InverseMethods:
@@ -687,6 +695,8 @@ Style/MethodCallWithoutArgsParentheses:
687
695
  Enabled: false
688
696
  Style/MethodCallWithArgsParentheses:
689
697
  Enabled: false
698
+ Style/MultilineInPatternThen:
699
+ Enabled: false
690
700
  Style/RedundantAssignment:
691
701
  Enabled: false
692
702
  Style/RedundantFetchBlock:
@@ -787,6 +797,8 @@ Style/PreferredHashMethods:
787
797
  Enabled: false
788
798
  Style/Proc:
789
799
  Enabled: false
800
+ Style/QuotedSymbols:
801
+ Enabled: false
790
802
  Style/RaiseArgs:
791
803
  Enabled: false
792
804
  Style/RandomWithOffset:
@@ -883,6 +895,8 @@ Style/SymbolProc:
883
895
  Enabled: false
884
896
  Style/TernaryParentheses:
885
897
  Enabled: false
898
+ Style/TopLevelMethodDefinition:
899
+ Enabled: false
886
900
  Style/TrailingBodyOnClass:
887
901
  Enabled: false
888
902
  Style/TrailingBodyOnMethodDefinition:
data/config/upstream.yml CHANGED
@@ -270,8 +270,8 @@ Layout/AccessModifierIndentation:
270
270
  SupportedStyles:
271
271
  - outdent
272
272
  - indent
273
- # By default, the indentation width from Layout/IndentationWidth is used
274
- # But it can be overridden by setting this parameter
273
+ # By default the indentation width from `Layout/IndentationWidth` is used,
274
+ # but it can be overridden by setting this parameter.
275
275
  IndentationWidth: ~
276
276
 
277
277
  Layout/ArgumentAlignment:
@@ -299,8 +299,8 @@ Layout/ArgumentAlignment:
299
299
  SupportedStyles:
300
300
  - with_first_argument
301
301
  - with_fixed_indentation
302
- # By default, the indentation width from Layout/IndentationWidth is used
303
- # But it can be overridden by setting this parameter
302
+ # By default the indentation width from `Layout/IndentationWidth` is used,
303
+ # but it can be overridden by setting this parameter.
304
304
  IndentationWidth: ~
305
305
 
306
306
  Layout/ArrayAlignment:
@@ -328,8 +328,8 @@ Layout/ArrayAlignment:
328
328
  SupportedStyles:
329
329
  - with_first_element
330
330
  - with_fixed_indentation
331
- # By default, the indentation width from Layout/IndentationWidth is used
332
- # But it can be overridden by setting this parameter
331
+ # By default the indentation width from `Layout/IndentationWidth` is used,
332
+ # but it can be overridden by setting this parameter.
333
333
  IndentationWidth: ~
334
334
 
335
335
  Layout/AssignmentIndentation:
@@ -339,8 +339,8 @@ Layout/AssignmentIndentation:
339
339
  Enabled: true
340
340
  VersionAdded: '0.49'
341
341
  VersionChanged: '0.77'
342
- # By default, the indentation width from `Layout/IndentationWidth` is used
343
- # But it can be overridden by setting this parameter
342
+ # By default the indentation width from `Layout/IndentationWidth` is used,
343
+ # but it can be overridden by setting this parameter.
344
344
  IndentationWidth: ~
345
345
 
346
346
  Layout/BeginEndAlignment:
@@ -377,18 +377,19 @@ Layout/BlockEndNewline:
377
377
  VersionAdded: '0.49'
378
378
 
379
379
  Layout/CaseIndentation:
380
- Description: 'Indentation of when in a case/when/[else/]end.'
380
+ Description: 'Indentation of when in a case/(when|in)/[else/]end.'
381
381
  StyleGuide: '#indent-when-to-case'
382
382
  Enabled: true
383
383
  VersionAdded: '0.49'
384
+ VersionChanged: '1.16'
384
385
  EnforcedStyle: case
385
386
  SupportedStyles:
386
387
  - case
387
388
  - end
388
389
  IndentOneStep: false
389
- # By default, the indentation width from `Layout/IndentationWidth` is used.
390
- # But it can be overridden by setting this parameter.
391
- # This only matters if `IndentOneStep` is `true`
390
+ # By default the indentation width from `Layout/IndentationWidth` is used,
391
+ # but it can be overridden by setting this parameter.
392
+ # This only matters if `IndentOneStep` is `true`.
392
393
  IndentationWidth: ~
393
394
 
394
395
  Layout/ClassStructure:
@@ -665,8 +666,8 @@ Layout/FirstArgumentIndentation:
665
666
  # Same as `special_for_inner_method_call` except that the special rule only
666
667
  # applies if the outer method call encloses its arguments in parentheses.
667
668
  - special_for_inner_method_call_in_parentheses
668
- # By default, the indentation width from `Layout/IndentationWidth` is used
669
- # But it can be overridden by setting this parameter
669
+ # By default the indentation width from `Layout/IndentationWidth` is used,
670
+ # but it can be overridden by setting this parameter.
670
671
  IndentationWidth: ~
671
672
 
672
673
  Layout/FirstArrayElementIndentation:
@@ -692,8 +693,8 @@ Layout/FirstArrayElementIndentation:
692
693
  - special_inside_parentheses
693
694
  - consistent
694
695
  - align_brackets
695
- # By default, the indentation width from `Layout/IndentationWidth` is used
696
- # But it can be overridden by setting this parameter
696
+ # By default the indentation width from `Layout/IndentationWidth` is used,
697
+ # but it can be overridden by setting this parameter.
697
698
  IndentationWidth: ~
698
699
 
699
700
  Layout/FirstArrayElementLineBreak:
@@ -724,8 +725,8 @@ Layout/FirstHashElementIndentation:
724
725
  - special_inside_parentheses
725
726
  - consistent
726
727
  - align_braces
727
- # By default, the indentation width from `Layout/IndentationWidth` is used
728
- # But it can be overridden by setting this parameter
728
+ # By default the indentation width from `Layout/IndentationWidth` is used,
729
+ # but it can be overridden by setting this parameter.
729
730
  IndentationWidth: ~
730
731
 
731
732
  Layout/FirstHashElementLineBreak:
@@ -760,8 +761,8 @@ Layout/FirstParameterIndentation:
760
761
  SupportedStyles:
761
762
  - consistent
762
763
  - align_parentheses
763
- # By default, the indentation width from `Layout/IndentationWidth` is used
764
- # But it can be overridden by setting this parameter
764
+ # By default the indentation width from `Layout/IndentationWidth` is used,
765
+ # but it can be overridden by setting this parameter.
765
766
  IndentationWidth: ~
766
767
 
767
768
  Layout/HashAlignment:
@@ -771,7 +772,7 @@ Layout/HashAlignment:
771
772
  Enabled: true
772
773
  AllowMultipleStyles: true
773
774
  VersionAdded: '0.49'
774
- VersionChanged: '0.77'
775
+ VersionChanged: '1.16'
775
776
  # Alignment of entries using hash rocket as separator. Valid values are:
776
777
  #
777
778
  # key - left alignment of keys
@@ -882,8 +883,8 @@ Layout/IndentationStyle:
882
883
  Enabled: true
883
884
  VersionAdded: '0.49'
884
885
  VersionChanged: '0.82'
885
- # By default, the indentation width from Layout/IndentationWidth is used
886
- # But it can be overridden by setting this parameter
886
+ # By default the indentation width from `Layout/IndentationWidth` is used,
887
+ # but it can be overridden by setting this parameter.
887
888
  # It is used during auto-correction to determine how many spaces should
888
889
  # replace each tab.
889
890
  IndentationWidth: ~
@@ -922,6 +923,20 @@ Layout/LeadingEmptyLines:
922
923
  VersionAdded: '0.57'
923
924
  VersionChanged: '0.77'
924
925
 
926
+ Layout/LineEndStringConcatenationIndentation:
927
+ Description: >-
928
+ Checks the indentation of the next line after a line that
929
+ ends with a string literal and a backslash.
930
+ Enabled: pending
931
+ VersionAdded: '1.18'
932
+ EnforcedStyle: aligned
933
+ SupportedStyles:
934
+ - aligned
935
+ - indented
936
+ # By default the indentation width from `Layout/IndentationWidth` is used,
937
+ # but it can be overridden by setting this parameter.
938
+ IndentationWidth: ~
939
+
925
940
  Layout/LineLength:
926
941
  Description: 'Checks that line length does not exceed the configured limit.'
927
942
  StyleGuide: '#max-line-length'
@@ -1052,8 +1067,8 @@ Layout/MultilineMethodCallIndentation:
1052
1067
  - aligned
1053
1068
  - indented
1054
1069
  - indented_relative_to_receiver
1055
- # By default, the indentation width from Layout/IndentationWidth is used
1056
- # But it can be overridden by setting this parameter
1070
+ # By default the indentation width from `Layout/IndentationWidth` is used,
1071
+ # but it can be overridden by setting this parameter.
1057
1072
  IndentationWidth: ~
1058
1073
 
1059
1074
  Layout/MultilineMethodDefinitionBraceLayout:
@@ -1082,8 +1097,8 @@ Layout/MultilineOperationIndentation:
1082
1097
  SupportedStyles:
1083
1098
  - aligned
1084
1099
  - indented
1085
- # By default, the indentation width from `Layout/IndentationWidth` is used
1086
- # But it can be overridden by setting this parameter
1100
+ # By default the indentation width from `Layout/IndentationWidth` is used,
1101
+ # but it can be overridden by setting this parameter.
1087
1102
  IndentationWidth: ~
1088
1103
 
1089
1104
  Layout/ParameterAlignment:
@@ -1111,8 +1126,8 @@ Layout/ParameterAlignment:
1111
1126
  SupportedStyles:
1112
1127
  - with_first_parameter
1113
1128
  - with_fixed_indentation
1114
- # By default, the indentation width from Layout/IndentationWidth is used
1115
- # But it can be overridden by setting this parameter
1129
+ # By default the indentation width from `Layout/IndentationWidth` is used,
1130
+ # but it can be overridden by setting this parameter.
1116
1131
  IndentationWidth: ~
1117
1132
 
1118
1133
  Layout/RedundantLineBreak:
@@ -1612,7 +1627,7 @@ Lint/EmptyBlock:
1612
1627
  Description: 'This cop checks for blocks without a body.'
1613
1628
  Enabled: pending
1614
1629
  VersionAdded: '1.1'
1615
- VersionChanged: '1.3'
1630
+ VersionChanged: '1.15'
1616
1631
  AllowComments: true
1617
1632
  AllowEmptyLambdas: true
1618
1633
 
@@ -1645,6 +1660,12 @@ Lint/EmptyFile:
1645
1660
  AllowComments: true
1646
1661
  VersionAdded: '0.90'
1647
1662
 
1663
+ Lint/EmptyInPattern:
1664
+ Description: 'Checks for the presence of `in` pattern branches without a body.'
1665
+ Enabled: pending
1666
+ AllowComments: true
1667
+ VersionAdded: '1.16'
1668
+
1648
1669
  Lint/EmptyInterpolation:
1649
1670
  Description: 'Checks for empty string interpolation.'
1650
1671
  Enabled: true
@@ -1788,7 +1809,7 @@ Lint/MissingCopEnableDirective:
1788
1809
  Lint/MissingSuper:
1789
1810
  Description: >-
1790
1811
  This cop checks for the presence of constructors and lifecycle callbacks
1791
- without calls to `super`'.
1812
+ without calls to `super`.
1792
1813
  Enabled: true
1793
1814
  VersionAdded: '0.89'
1794
1815
  VersionChanged: '1.4'
@@ -2092,6 +2113,7 @@ Lint/SymbolConversion:
2092
2113
  Description: 'Checks for unnecessary symbol conversions.'
2093
2114
  Enabled: pending
2094
2115
  VersionAdded: '1.9'
2116
+ VersionChanged: '1.16'
2095
2117
  EnforcedStyle: strict
2096
2118
  SupportedStyles:
2097
2119
  - strict
@@ -2512,6 +2534,31 @@ Naming/HeredocDelimiterNaming:
2512
2534
  ForbiddenDelimiters:
2513
2535
  - !ruby/regexp '/(^|\s)(EO[A-Z]{1}|END)(\s|$)/'
2514
2536
 
2537
+ Naming/InclusiveLanguage:
2538
+ Description: 'Recommend the use of inclusive language instead of problematic terms.'
2539
+ Enabled: pending
2540
+ VersionAdded: '1.18'
2541
+ CheckIdentifiers: true
2542
+ CheckConstants: true
2543
+ CheckVariables: true
2544
+ CheckStrings: false
2545
+ CheckSymbols: true
2546
+ CheckComments: true
2547
+ CheckFilepaths: true
2548
+ FlaggedTerms:
2549
+ whitelist:
2550
+ Regex: !ruby/regexp '/white[-_\s]?list/'
2551
+ Suggestions:
2552
+ - allowlist
2553
+ - permit
2554
+ blacklist:
2555
+ Regex: !ruby/regexp '/black[-_\s]?list/'
2556
+ Suggestions:
2557
+ - denylist
2558
+ - block
2559
+ slave:
2560
+ Suggestions: ['replica', 'secondary', 'follower']
2561
+
2515
2562
  Naming/MemoizedInstanceVariableName:
2516
2563
  Description: >-
2517
2564
  Memoized method name should match memo instance variable name.
@@ -3103,6 +3150,7 @@ Style/CommentAnnotation:
3103
3150
  - HACK
3104
3151
  - REVIEW
3105
3152
  - NOTE
3153
+ RequireColon: true
3106
3154
 
3107
3155
  Style/CommentedKeyword:
3108
3156
  Description: 'Do not place comments on the same line as certain keywords.'
@@ -3480,6 +3528,7 @@ Style/HashAsLastArrayItem:
3480
3528
 
3481
3529
  Style/HashConversion:
3482
3530
  Description: 'Avoid Hash[] in favor of ary.to_h or literal hashes.'
3531
+ StyleGuide: '#avoid-hash-constructor'
3483
3532
  Enabled: pending
3484
3533
  VersionAdded: '1.10'
3485
3534
  VersionChanged: '1.11'
@@ -3489,8 +3538,10 @@ Style/HashEachMethods:
3489
3538
  Description: 'Use Hash#each_key and Hash#each_value.'
3490
3539
  StyleGuide: '#hash-each'
3491
3540
  Enabled: true
3492
- VersionAdded: '0.80'
3493
3541
  Safe: false
3542
+ VersionAdded: '0.80'
3543
+ VersionChanged: '1.16'
3544
+ AllowedReceivers: []
3494
3545
 
3495
3546
  Style/HashExcept:
3496
3547
  Description: >-
@@ -3553,6 +3604,7 @@ Style/IdenticalConditionalBranches:
3553
3604
  out of the conditional.
3554
3605
  Enabled: true
3555
3606
  VersionAdded: '0.36'
3607
+ VersionChanged: '1.16'
3556
3608
 
3557
3609
  Style/IfInsideElse:
3558
3610
  Description: 'Finds if nodes inside else, which can be converted to elsif.'
@@ -3599,6 +3651,12 @@ Style/ImplicitRuntimeError:
3599
3651
  Enabled: false
3600
3652
  VersionAdded: '0.41'
3601
3653
 
3654
+ Style/InPatternThen:
3655
+ Description: 'Checks for `in;` uses in `case` expressions.'
3656
+ StyleGuide: '#no-in-pattern-semicolons'
3657
+ Enabled: pending
3658
+ VersionAdded: '1.16'
3659
+
3602
3660
  Style/InfiniteLoop:
3603
3661
  Description: >-
3604
3662
  Use Kernel#loop for infinite loops.
@@ -3827,6 +3885,12 @@ Style/MultilineIfThen:
3827
3885
  VersionAdded: '0.9'
3828
3886
  VersionChanged: '0.26'
3829
3887
 
3888
+ Style/MultilineInPatternThen:
3889
+ Description: 'Do not use `then` for multi-line `in` statement.'
3890
+ StyleGuide: '#no-then'
3891
+ Enabled: pending
3892
+ VersionAdded: '1.16'
3893
+
3830
3894
  Style/MultilineMemoization:
3831
3895
  Description: 'Wrap multiline memoizations in a `begin` and `end` block.'
3832
3896
  Enabled: true
@@ -3998,6 +4062,7 @@ Style/NilLambda:
3998
4062
  Description: 'Prefer `-> {}` to `-> { nil }`.'
3999
4063
  Enabled: pending
4000
4064
  VersionAdded: '1.3'
4065
+ VersionChanged: '1.15'
4001
4066
 
4002
4067
  Style/NonNilCheck:
4003
4068
  Description: 'Checks for redundant nil checks.'
@@ -4184,6 +4249,16 @@ Style/Proc:
4184
4249
  VersionAdded: '0.9'
4185
4250
  VersionChanged: '0.18'
4186
4251
 
4252
+ Style/QuotedSymbols:
4253
+ Description: 'Use a consistent style for quoted symbols.'
4254
+ Enabled: pending
4255
+ VersionAdded: '1.16'
4256
+ EnforcedStyle: same_as_string_literals
4257
+ SupportedStyles:
4258
+ - same_as_string_literals
4259
+ - single_quotes
4260
+ - double_quotes
4261
+
4187
4262
  Style/RaiseArgs:
4188
4263
  Description: 'Checks the arguments passed to raise/fail.'
4189
4264
  StyleGuide: '#exception-class-messages'
@@ -4541,7 +4616,8 @@ Style/StringConcatenation:
4541
4616
  Enabled: true
4542
4617
  Safe: false
4543
4618
  VersionAdded: '0.89'
4544
- VersionChanged: '1.6'
4619
+ VersionChanged: '1.18'
4620
+ Mode: aggressive
4545
4621
 
4546
4622
  Style/StringHashKeys:
4547
4623
  Description: 'Prefer symbols instead of strings as hash keys.'
@@ -4651,6 +4727,12 @@ Style/TernaryParentheses:
4651
4727
  - require_parentheses_when_complex
4652
4728
  AllowSafeAssignment: true
4653
4729
 
4730
+ Style/TopLevelMethodDefinition:
4731
+ Description: 'This cop looks for top-level method definitions.'
4732
+ StyleGuide: '#top-level-methods'
4733
+ Enabled: false
4734
+ VersionAdded: '1.15'
4735
+
4654
4736
  Style/TrailingBodyOnClass:
4655
4737
  Description: 'Class body goes below class statement.'
4656
4738
  Enabled: true
@@ -4737,7 +4819,7 @@ Style/TrivialAccessors:
4737
4819
  StyleGuide: '#attr_family'
4738
4820
  Enabled: true
4739
4821
  VersionAdded: '0.9'
4740
- VersionChanged: '0.77'
4822
+ VersionChanged: '1.15'
4741
4823
  # When set to `false` the cop will suggest the use of accessor methods
4742
4824
  # in situations like:
4743
4825
  #
@@ -4756,7 +4838,7 @@ Style/TrivialAccessors:
4756
4838
  # on_exception :restart
4757
4839
  #
4758
4840
  # Commonly used in DSLs
4759
- AllowDSLWriters: false
4841
+ AllowDSLWriters: true
4760
4842
  IgnoreClassMethods: false
4761
4843
  AllowedMethods:
4762
4844
  - to_ary
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Chefstyle
3
- VERSION = "2.0.3"
4
- RUBOCOP_VERSION = "1.14.0"
3
+ VERSION = "2.0.7"
4
+ RUBOCOP_VERSION = "1.18.4"
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.3
4
+ version: 2.0.7
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-05-05 00:00:00.000000000 Z
11
+ date: 2021-07-24 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.14.0
19
+ version: 1.18.4
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.14.0
26
+ version: 1.18.4
27
27
  description:
28
28
  email:
29
29
  - oss@chef.io