chefstyle 1.7.4 → 2.0.6

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: e9f848cc66621a3289bdfb404e143df08d23361d21b95f4c628b2ebcead2e980
4
- data.tar.gz: 22df81f00aff843c8c692199a3f3cdec0ceac9a847c106918d3d267596d557f2
3
+ metadata.gz: 1a61b388a0bd0cc6406d42044dd437868ac702d71f4c1c65371a91123eaa3234
4
+ data.tar.gz: 2168512c0fecb8b5a2ea6c4f6e78b66eeac9cd49890e8c040f7493d317f9835c
5
5
  SHA512:
6
- metadata.gz: d17fde1788327c44ed3252b414b347ac01b87e1ca71e98ceec814a18a9d9c9bc6cf6f572d52b140227953566a78a647eb8ef06763c3331b727035b00b7b7efa0
7
- data.tar.gz: dcbdeaa805818f00871aa53c6d6cd8cbe66eab9e4e9b0952d7711c9931c589e55d290b1e125f1c3c08a91d41ac2dca18cc99407c29135dce2beb7e60b095b98c
6
+ metadata.gz: d8183c386be7ccef124ad1c82cfdbf0c147178a5f2beb0c9aeeb70d28f117a339fe4914e538c512d83758a5efdeb29aa0aaec810fbb1d6150fb5d2b1061b4a9e
7
+ data.tar.gz: 37ccdda60b83bef2ef3f90ef0d36efdcd1eb48e9d9b2e7e008057850ee2f968de1d92f08c809cd89f52b9cfe2dd9f3db2cc6f621161a99289881f9c90c2fade2
data/chefstyle.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
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
- spec.required_ruby_version = ">= 2.4"
15
+ spec.required_ruby_version = ">= 2.5"
16
16
 
17
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}
data/config/chefstyle.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.4
2
+ TargetRubyVersion: 2.5
3
3
  SuggestExtensions: false
4
4
 
5
5
  #
@@ -5,6 +5,8 @@ Bundler/DuplicatedGem:
5
5
  Enabled: false
6
6
  Bundler/GemComment:
7
7
  Enabled: false
8
+ Bundler/GemVersion:
9
+ Enabled: false
8
10
  Bundler/InsecureProtocolSource:
9
11
  Enabled: false
10
12
  Bundler/OrderedGems:
@@ -121,6 +123,8 @@ Layout/LeadingCommentSpace:
121
123
  Enabled: false
122
124
  Layout/LeadingEmptyLines:
123
125
  Enabled: false
126
+ Layout/LineEndStringConcatenationIndentation:
127
+ Enabled: false
124
128
  Layout/LineLength:
125
129
  Enabled: false
126
130
  Layout/MultilineArrayBraceLayout:
@@ -147,8 +151,12 @@ Layout/MultilineOperationIndentation:
147
151
  Enabled: false
148
152
  Layout/ParameterAlignment:
149
153
  Enabled: false
154
+ Layout/RedundantLineBreak:
155
+ Enabled: false
150
156
  Layout/RescueEnsureAlignment:
151
157
  Enabled: false
158
+ Layout/SingleLineBlockChain:
159
+ Enabled: false
152
160
  Layout/SpaceAfterColon:
153
161
  Enabled: false
154
162
  Layout/SpaceAfterComma:
@@ -269,6 +277,8 @@ Lint/EmptyExpression:
269
277
  Enabled: false
270
278
  Lint/EmptyFile:
271
279
  Enabled: false
280
+ Lint/EmptyInPattern:
281
+ Enabled: false
272
282
  Lint/EmptyInterpolation:
273
283
  Enabled: false
274
284
  Lint/EmptyWhen:
@@ -479,6 +489,8 @@ Naming/HeredocDelimiterCase:
479
489
  Enabled: false
480
490
  Naming/HeredocDelimiterNaming:
481
491
  Enabled: false
492
+ Naming/InclusiveLanguage:
493
+ Enabled: false
482
494
  Naming/MemoizedInstanceVariableName:
483
495
  Enabled: false
484
496
  Naming/MethodName:
@@ -661,6 +673,8 @@ Style/IfWithSemicolon:
661
673
  Enabled: false
662
674
  Style/ImplicitRuntimeError:
663
675
  Enabled: false
676
+ Style/InPatternThen:
677
+ Enabled: false
664
678
  Style/InfiniteLoop:
665
679
  Enabled: false
666
680
  Style/InverseMethods:
@@ -681,6 +695,8 @@ Style/MethodCallWithoutArgsParentheses:
681
695
  Enabled: false
682
696
  Style/MethodCallWithArgsParentheses:
683
697
  Enabled: false
698
+ Style/MultilineInPatternThen:
699
+ Enabled: false
684
700
  Style/RedundantAssignment:
685
701
  Enabled: false
686
702
  Style/RedundantFetchBlock:
@@ -781,6 +797,8 @@ Style/PreferredHashMethods:
781
797
  Enabled: false
782
798
  Style/Proc:
783
799
  Enabled: false
800
+ Style/QuotedSymbols:
801
+ Enabled: false
784
802
  Style/RaiseArgs:
785
803
  Enabled: false
786
804
  Style/RandomWithOffset:
@@ -877,6 +895,8 @@ Style/SymbolProc:
877
895
  Enabled: false
878
896
  Style/TernaryParentheses:
879
897
  Enabled: false
898
+ Style/TopLevelMethodDefinition:
899
+ Enabled: false
880
900
  Style/TrailingBodyOnClass:
881
901
  Enabled: false
882
902
  Style/TrailingBodyOnMethodDefinition:
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. 2.5); the teeny version of Ruby
133
+ # values are specificed 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
@@ -138,7 +138,7 @@ AllCops:
138
138
  # or gems.locked file. (Although the Ruby version is specified in the Gemfile
139
139
  # or gems.rb file, RuboCop reads the final value from the lock file.) If the
140
140
  # Ruby version is still unresolved, RuboCop will use the oldest officially
141
- # supported Ruby version (currently Ruby 2.4).
141
+ # supported Ruby version (currently Ruby 2.5).
142
142
  TargetRubyVersion: ~
143
143
  # Determines if a notification for extension libraries should be shown when
144
144
  # rubocop is run. Keys are the name of the extension, and values are an array
@@ -174,6 +174,20 @@ Bundler/GemComment:
174
174
  IgnoredGems: []
175
175
  OnlyFor: []
176
176
 
177
+ Bundler/GemVersion:
178
+ Description: 'Requires or forbids specifying gem versions.'
179
+ Enabled: false
180
+ VersionAdded: '1.14'
181
+ EnforcedStyle: 'required'
182
+ SupportedStyles:
183
+ - 'required'
184
+ - 'forbidden'
185
+ Include:
186
+ - '**/*.gemfile'
187
+ - '**/Gemfile'
188
+ - '**/gems.rb'
189
+ AllowedGems: []
190
+
177
191
  Bundler/InsecureProtocolSource:
178
192
  Description: >-
179
193
  The source `:gemcutter`, `:rubygems` and `:rubyforge` are deprecated
@@ -256,8 +270,8 @@ Layout/AccessModifierIndentation:
256
270
  SupportedStyles:
257
271
  - outdent
258
272
  - indent
259
- # By default, the indentation width from Layout/IndentationWidth is used
260
- # 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.
261
275
  IndentationWidth: ~
262
276
 
263
277
  Layout/ArgumentAlignment:
@@ -285,8 +299,8 @@ Layout/ArgumentAlignment:
285
299
  SupportedStyles:
286
300
  - with_first_argument
287
301
  - with_fixed_indentation
288
- # By default, the indentation width from Layout/IndentationWidth is used
289
- # 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.
290
304
  IndentationWidth: ~
291
305
 
292
306
  Layout/ArrayAlignment:
@@ -314,8 +328,8 @@ Layout/ArrayAlignment:
314
328
  SupportedStyles:
315
329
  - with_first_element
316
330
  - with_fixed_indentation
317
- # By default, the indentation width from Layout/IndentationWidth is used
318
- # 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.
319
333
  IndentationWidth: ~
320
334
 
321
335
  Layout/AssignmentIndentation:
@@ -325,8 +339,8 @@ Layout/AssignmentIndentation:
325
339
  Enabled: true
326
340
  VersionAdded: '0.49'
327
341
  VersionChanged: '0.77'
328
- # By default, the indentation width from `Layout/IndentationWidth` is used
329
- # 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.
330
344
  IndentationWidth: ~
331
345
 
332
346
  Layout/BeginEndAlignment:
@@ -363,18 +377,19 @@ Layout/BlockEndNewline:
363
377
  VersionAdded: '0.49'
364
378
 
365
379
  Layout/CaseIndentation:
366
- Description: 'Indentation of when in a case/when/[else/]end.'
380
+ Description: 'Indentation of when in a case/(when|in)/[else/]end.'
367
381
  StyleGuide: '#indent-when-to-case'
368
382
  Enabled: true
369
383
  VersionAdded: '0.49'
384
+ VersionChanged: '1.16'
370
385
  EnforcedStyle: case
371
386
  SupportedStyles:
372
387
  - case
373
388
  - end
374
389
  IndentOneStep: false
375
- # By default, the indentation width from `Layout/IndentationWidth` is used.
376
- # But it can be overridden by setting this parameter.
377
- # 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`.
378
393
  IndentationWidth: ~
379
394
 
380
395
  Layout/ClassStructure:
@@ -651,8 +666,8 @@ Layout/FirstArgumentIndentation:
651
666
  # Same as `special_for_inner_method_call` except that the special rule only
652
667
  # applies if the outer method call encloses its arguments in parentheses.
653
668
  - special_for_inner_method_call_in_parentheses
654
- # By default, the indentation width from `Layout/IndentationWidth` is used
655
- # 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.
656
671
  IndentationWidth: ~
657
672
 
658
673
  Layout/FirstArrayElementIndentation:
@@ -678,8 +693,8 @@ Layout/FirstArrayElementIndentation:
678
693
  - special_inside_parentheses
679
694
  - consistent
680
695
  - align_brackets
681
- # By default, the indentation width from `Layout/IndentationWidth` is used
682
- # 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.
683
698
  IndentationWidth: ~
684
699
 
685
700
  Layout/FirstArrayElementLineBreak:
@@ -710,8 +725,8 @@ Layout/FirstHashElementIndentation:
710
725
  - special_inside_parentheses
711
726
  - consistent
712
727
  - align_braces
713
- # By default, the indentation width from `Layout/IndentationWidth` is used
714
- # 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.
715
730
  IndentationWidth: ~
716
731
 
717
732
  Layout/FirstHashElementLineBreak:
@@ -746,8 +761,8 @@ Layout/FirstParameterIndentation:
746
761
  SupportedStyles:
747
762
  - consistent
748
763
  - align_parentheses
749
- # By default, the indentation width from `Layout/IndentationWidth` is used
750
- # 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.
751
766
  IndentationWidth: ~
752
767
 
753
768
  Layout/HashAlignment:
@@ -757,7 +772,7 @@ Layout/HashAlignment:
757
772
  Enabled: true
758
773
  AllowMultipleStyles: true
759
774
  VersionAdded: '0.49'
760
- VersionChanged: '0.77'
775
+ VersionChanged: '1.16'
761
776
  # Alignment of entries using hash rocket as separator. Valid values are:
762
777
  #
763
778
  # key - left alignment of keys
@@ -868,8 +883,8 @@ Layout/IndentationStyle:
868
883
  Enabled: true
869
884
  VersionAdded: '0.49'
870
885
  VersionChanged: '0.82'
871
- # By default, the indentation width from Layout/IndentationWidth is used
872
- # 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.
873
888
  # It is used during auto-correction to determine how many spaces should
874
889
  # replace each tab.
875
890
  IndentationWidth: ~
@@ -908,6 +923,20 @@ Layout/LeadingEmptyLines:
908
923
  VersionAdded: '0.57'
909
924
  VersionChanged: '0.77'
910
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
+
911
940
  Layout/LineLength:
912
941
  Description: 'Checks that line length does not exceed the configured limit.'
913
942
  StyleGuide: '#max-line-length'
@@ -1038,8 +1067,8 @@ Layout/MultilineMethodCallIndentation:
1038
1067
  - aligned
1039
1068
  - indented
1040
1069
  - indented_relative_to_receiver
1041
- # By default, the indentation width from Layout/IndentationWidth is used
1042
- # 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.
1043
1072
  IndentationWidth: ~
1044
1073
 
1045
1074
  Layout/MultilineMethodDefinitionBraceLayout:
@@ -1068,8 +1097,8 @@ Layout/MultilineOperationIndentation:
1068
1097
  SupportedStyles:
1069
1098
  - aligned
1070
1099
  - indented
1071
- # By default, the indentation width from `Layout/IndentationWidth` is used
1072
- # 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.
1073
1102
  IndentationWidth: ~
1074
1103
 
1075
1104
  Layout/ParameterAlignment:
@@ -1097,15 +1126,28 @@ Layout/ParameterAlignment:
1097
1126
  SupportedStyles:
1098
1127
  - with_first_parameter
1099
1128
  - with_fixed_indentation
1100
- # By default, the indentation width from Layout/IndentationWidth is used
1101
- # 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.
1102
1131
  IndentationWidth: ~
1103
1132
 
1133
+ Layout/RedundantLineBreak:
1134
+ Description: >-
1135
+ Do not break up an expression into multiple lines when it fits
1136
+ on a single line.
1137
+ Enabled: false
1138
+ InspectBlocks: false
1139
+ VersionAdded: '1.13'
1140
+
1104
1141
  Layout/RescueEnsureAlignment:
1105
1142
  Description: 'Align rescues and ensures correctly.'
1106
1143
  Enabled: true
1107
1144
  VersionAdded: '0.49'
1108
1145
 
1146
+ Layout/SingleLineBlockChain:
1147
+ Description: 'Put method call on a separate line if chained to a single line block.'
1148
+ Enabled: false
1149
+ VersionAdded: '1.14'
1150
+
1109
1151
  Layout/SpaceAfterColon:
1110
1152
  Description: 'Use spaces after colons.'
1111
1153
  StyleGuide: '#spaces-operators'
@@ -1380,6 +1422,8 @@ Lint/AmbiguousBlockAssociation:
1380
1422
  StyleGuide: '#syntax'
1381
1423
  Enabled: true
1382
1424
  VersionAdded: '0.48'
1425
+ VersionChanged: '1.13'
1426
+ IgnoredMethods: []
1383
1427
 
1384
1428
  Lint/AmbiguousOperator:
1385
1429
  Description: >-
@@ -1583,7 +1627,7 @@ Lint/EmptyBlock:
1583
1627
  Description: 'This cop checks for blocks without a body.'
1584
1628
  Enabled: pending
1585
1629
  VersionAdded: '1.1'
1586
- VersionChanged: '1.3'
1630
+ VersionChanged: '1.15'
1587
1631
  AllowComments: true
1588
1632
  AllowEmptyLambdas: true
1589
1633
 
@@ -1616,6 +1660,12 @@ Lint/EmptyFile:
1616
1660
  AllowComments: true
1617
1661
  VersionAdded: '0.90'
1618
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
+
1619
1669
  Lint/EmptyInterpolation:
1620
1670
  Description: 'Checks for empty string interpolation.'
1621
1671
  Enabled: true
@@ -1759,7 +1809,7 @@ Lint/MissingCopEnableDirective:
1759
1809
  Lint/MissingSuper:
1760
1810
  Description: >-
1761
1811
  This cop checks for the presence of constructors and lifecycle callbacks
1762
- without calls to `super`'.
1812
+ without calls to `super`.
1763
1813
  Enabled: true
1764
1814
  VersionAdded: '0.89'
1765
1815
  VersionChanged: '1.4'
@@ -2063,6 +2113,7 @@ Lint/SymbolConversion:
2063
2113
  Description: 'Checks for unnecessary symbol conversions.'
2064
2114
  Enabled: pending
2065
2115
  VersionAdded: '1.9'
2116
+ VersionChanged: '1.16'
2066
2117
  EnforcedStyle: strict
2067
2118
  SupportedStyles:
2068
2119
  - strict
@@ -2483,6 +2534,31 @@ Naming/HeredocDelimiterNaming:
2483
2534
  ForbiddenDelimiters:
2484
2535
  - !ruby/regexp '/(^|\s)(EO[A-Z]{1}|END)(\s|$)/'
2485
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
+
2486
2562
  Naming/MemoizedInstanceVariableName:
2487
2563
  Description: >-
2488
2564
  Memoized method name should match memo instance variable name.
@@ -3074,6 +3150,7 @@ Style/CommentAnnotation:
3074
3150
  - HACK
3075
3151
  - REVIEW
3076
3152
  - NOTE
3153
+ RequireColon: true
3077
3154
 
3078
3155
  Style/CommentedKeyword:
3079
3156
  Description: 'Do not place comments on the same line as certain keywords.'
@@ -3451,6 +3528,7 @@ Style/HashAsLastArrayItem:
3451
3528
 
3452
3529
  Style/HashConversion:
3453
3530
  Description: 'Avoid Hash[] in favor of ary.to_h or literal hashes.'
3531
+ StyleGuide: '#avoid-hash-constructor'
3454
3532
  Enabled: pending
3455
3533
  VersionAdded: '1.10'
3456
3534
  VersionChanged: '1.11'
@@ -3460,8 +3538,10 @@ Style/HashEachMethods:
3460
3538
  Description: 'Use Hash#each_key and Hash#each_value.'
3461
3539
  StyleGuide: '#hash-each'
3462
3540
  Enabled: true
3463
- VersionAdded: '0.80'
3464
3541
  Safe: false
3542
+ VersionAdded: '0.80'
3543
+ VersionChanged: '1.16'
3544
+ AllowedReceivers: []
3465
3545
 
3466
3546
  Style/HashExcept:
3467
3547
  Description: >-
@@ -3524,6 +3604,7 @@ Style/IdenticalConditionalBranches:
3524
3604
  out of the conditional.
3525
3605
  Enabled: true
3526
3606
  VersionAdded: '0.36'
3607
+ VersionChanged: '1.16'
3527
3608
 
3528
3609
  Style/IfInsideElse:
3529
3610
  Description: 'Finds if nodes inside else, which can be converted to elsif.'
@@ -3570,6 +3651,12 @@ Style/ImplicitRuntimeError:
3570
3651
  Enabled: false
3571
3652
  VersionAdded: '0.41'
3572
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
+
3573
3660
  Style/InfiniteLoop:
3574
3661
  Description: >-
3575
3662
  Use Kernel#loop for infinite loops.
@@ -3798,6 +3885,12 @@ Style/MultilineIfThen:
3798
3885
  VersionAdded: '0.9'
3799
3886
  VersionChanged: '0.26'
3800
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
+
3801
3894
  Style/MultilineMemoization:
3802
3895
  Description: 'Wrap multiline memoizations in a `begin` and `end` block.'
3803
3896
  Enabled: true
@@ -3969,6 +4062,7 @@ Style/NilLambda:
3969
4062
  Description: 'Prefer `-> {}` to `-> { nil }`.'
3970
4063
  Enabled: pending
3971
4064
  VersionAdded: '1.3'
4065
+ VersionChanged: '1.15'
3972
4066
 
3973
4067
  Style/NonNilCheck:
3974
4068
  Description: 'Checks for redundant nil checks.'
@@ -4155,6 +4249,16 @@ Style/Proc:
4155
4249
  VersionAdded: '0.9'
4156
4250
  VersionChanged: '0.18'
4157
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
+
4158
4262
  Style/RaiseArgs:
4159
4263
  Description: 'Checks the arguments passed to raise/fail.'
4160
4264
  StyleGuide: '#exception-class-messages'
@@ -4512,7 +4616,8 @@ Style/StringConcatenation:
4512
4616
  Enabled: true
4513
4617
  Safe: false
4514
4618
  VersionAdded: '0.89'
4515
- VersionChanged: '1.6'
4619
+ VersionChanged: '1.18'
4620
+ Mode: aggressive
4516
4621
 
4517
4622
  Style/StringHashKeys:
4518
4623
  Description: 'Prefer symbols instead of strings as hash keys.'
@@ -4622,6 +4727,12 @@ Style/TernaryParentheses:
4622
4727
  - require_parentheses_when_complex
4623
4728
  AllowSafeAssignment: true
4624
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
+
4625
4736
  Style/TrailingBodyOnClass:
4626
4737
  Description: 'Class body goes below class statement.'
4627
4738
  Enabled: true
@@ -4708,7 +4819,7 @@ Style/TrivialAccessors:
4708
4819
  StyleGuide: '#attr_family'
4709
4820
  Enabled: true
4710
4821
  VersionAdded: '0.9'
4711
- VersionChanged: '0.77'
4822
+ VersionChanged: '1.15'
4712
4823
  # When set to `false` the cop will suggest the use of accessor methods
4713
4824
  # in situations like:
4714
4825
  #
@@ -4727,7 +4838,7 @@ Style/TrivialAccessors:
4727
4838
  # on_exception :restart
4728
4839
  #
4729
4840
  # Commonly used in DSLs
4730
- AllowDSLWriters: false
4841
+ AllowDSLWriters: true
4731
4842
  IgnoreClassMethods: false
4732
4843
  AllowedMethods:
4733
4844
  - to_ary
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Chefstyle
3
- VERSION = "1.7.4"
4
- RUBOCOP_VERSION = "1.12.0"
3
+ VERSION = "2.0.6"
4
+ RUBOCOP_VERSION = "1.18.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: 1.7.4
4
+ version: 2.0.6
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-03-24 00:00:00.000000000 Z
11
+ date: 2021-07-06 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.12.0
19
+ version: 1.18.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.12.0
26
+ version: 1.18.3
27
27
  description:
28
28
  email:
29
29
  - oss@chef.io
@@ -60,7 +60,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: '2.4'
63
+ version: '2.5'
64
64
  required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="