cookstyle 6.2.9 → 6.7.3

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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/config/cookstyle.yml +306 -15
  4. data/config/disable_all.yml +21 -3
  5. data/config/upstream.yml +141 -35
  6. data/lib/cookstyle.rb +1 -1
  7. data/lib/cookstyle/version.rb +2 -2
  8. data/lib/rubocop/chef/platform_helpers.rb +2 -1
  9. data/lib/rubocop/cop/chef/correctness/invalid_platform_family_values_in_case.rb +77 -0
  10. data/lib/rubocop/cop/chef/correctness/invalid_platform_values_in_case.rb +77 -0
  11. data/lib/rubocop/cop/chef/correctness/lazy_eval_node_attribute_defaults.rb +56 -0
  12. data/lib/rubocop/cop/chef/correctness/node_normal.rb +1 -1
  13. data/lib/rubocop/cop/chef/correctness/node_normal_unless.rb +1 -1
  14. data/lib/rubocop/cop/chef/correctness/openssl_password_helpers.rb +45 -0
  15. data/lib/rubocop/cop/chef/deprecation/depends_compat_resource.rb +1 -1
  16. data/lib/rubocop/cop/chef/deprecation/depends_partial_search.rb +1 -1
  17. data/lib/rubocop/cop/chef/deprecation/deprecated_chefspec_platform.rb +10 -4
  18. data/lib/rubocop/cop/chef/deprecation/deprecated_shellout_methods.rb +65 -0
  19. data/lib/rubocop/cop/chef/deprecation/easy_install.rb +2 -2
  20. data/lib/rubocop/cop/chef/deprecation/erl_call.rb +1 -1
  21. data/lib/rubocop/cop/chef/deprecation/locale_lc_all_property.rb +2 -2
  22. data/lib/rubocop/cop/chef/deprecation/node_methods_not_attributes.rb +1 -1
  23. data/lib/rubocop/cop/chef/deprecation/node_set.rb +2 -3
  24. data/lib/rubocop/cop/chef/deprecation/node_set_unless.rb +2 -3
  25. data/lib/rubocop/cop/chef/deprecation/powershell_cookbook_helpers.rb +3 -3
  26. data/lib/rubocop/cop/chef/deprecation/resource_uses_only_resource_name.rb +77 -0
  27. data/lib/rubocop/cop/chef/deprecation/ruby_27_keyword_argument_warnings.rb +59 -0
  28. data/lib/rubocop/cop/chef/deprecation/user_supports_property.rb +6 -1
  29. data/lib/rubocop/cop/chef/deprecation/xml_ruby_recipe.rb +3 -3
  30. data/lib/rubocop/cop/chef/modernize/includes_mixin_shellout.rb +24 -3
  31. data/lib/rubocop/cop/chef/modernize/respond_to_compile_time.rb +93 -0
  32. data/lib/rubocop/cop/chef/modernize/respond_to_provides.rb +15 -5
  33. data/lib/rubocop/cop/chef/modernize/shell_out_helper.rb +64 -0
  34. data/lib/rubocop/cop/chef/modernize/use_multipackage_installs.rb +8 -4
  35. data/lib/rubocop/cop/chef/style/overly_complex_supports_depends_metadata.rb +1 -1
  36. data/lib/rubocop/cop/target_chef_version.rb +4 -0
  37. data/lib/rubocop/monkey_patches/team.rb +24 -0
  38. metadata +14 -5
  39. data/lib/rubocop/monkey_patches/commissioner.rb +0 -26
@@ -59,6 +59,8 @@ Layout/EmptyLinesAroundAccessModifier:
59
59
  Enabled: false
60
60
  Layout/EmptyLinesAroundArguments:
61
61
  Enabled: false
62
+ Layout/EmptyLinesAroundAttributeAccessor:
63
+ Enabled: false
62
64
  Layout/EmptyLinesAroundBeginBody:
63
65
  Enabled: false
64
66
  Layout/EmptyLinesAroundBlockBody:
@@ -103,6 +105,8 @@ Layout/HeredocIndentation:
103
105
  Enabled: false
104
106
  Layout/IndentationConsistency:
105
107
  Enabled: false
108
+ Layout/IndentationStyle:
109
+ Enabled: false
106
110
  Layout/IndentationWidth:
107
111
  Enabled: false
108
112
  Layout/InitialIndentation:
@@ -155,6 +159,8 @@ Layout/SpaceAroundEqualsInParameterDefault:
155
159
  Enabled: false
156
160
  Layout/SpaceAroundKeyword:
157
161
  Enabled: false
162
+ Layout/SpaceAroundMethodCallOperator:
163
+ Enabled: false
158
164
  Layout/SpaceAroundOperators:
159
165
  Enabled: false
160
166
  Layout/SpaceBeforeBlockBraces:
@@ -187,8 +193,6 @@ Layout/SpaceInsideReferenceBrackets:
187
193
  Enabled: false
188
194
  Layout/SpaceInsideStringInterpolation:
189
195
  Enabled: false
190
- Layout/Tab:
191
- Enabled: false
192
196
  Layout/TrailingEmptyLines:
193
197
  Enabled: false
194
198
  Layout/TrailingWhitespace:
@@ -211,6 +215,8 @@ Lint/Debugger:
211
215
  Enabled: false
212
216
  Lint/DeprecatedClassMethods:
213
217
  Enabled: false
218
+ Lint/DeprecatedOpenSSLConstant:
219
+ Enabled: false
214
220
  Lint/DisjunctiveAssignmentInConstructor:
215
221
  Enabled: false
216
222
  Lint/DuplicateCaseCondition:
@@ -259,6 +265,8 @@ Lint/Loop:
259
265
  Enabled: false
260
266
  Lint/MissingCopEnableDirective:
261
267
  Enabled: false
268
+ Lint/MixedRegexpCaptureTypes:
269
+ Enabled: false
262
270
  Lint/MultipleComparison:
263
271
  Enabled: false
264
272
  Lint/NestedMethodDefinition:
@@ -467,6 +475,8 @@ Style/DefWithParentheses:
467
475
  Enabled: false
468
476
  Style/Dir:
469
477
  Enabled: false
478
+ Style/DisableCopsWithinSourceCodeDirective:
479
+ Enabled: false
470
480
  Style/DocumentationMethod:
471
481
  Enabled: false
472
482
  Style/Documentation:
@@ -501,6 +511,8 @@ Style/EvenOdd:
501
511
  Enabled: false
502
512
  Style/ExpandPathArguments:
503
513
  Enabled: false
514
+ Style/ExponentialNotation:
515
+ Enabled: false
504
516
  Style/FloatDivision:
505
517
  Enabled: false
506
518
  Style/For:
@@ -659,6 +671,10 @@ Style/RedundantParentheses:
659
671
  Enabled: false
660
672
  Style/RedundantPercentQ:
661
673
  Enabled: false
674
+ Style/RedundantRegexpCharacterClass:
675
+ Enabled: false
676
+ Style/RedundantRegexpEscape:
677
+ Enabled: false
662
678
  Style/RedundantReturn:
663
679
  Enabled: false
664
680
  Style/RedundantSelf:
@@ -691,6 +707,8 @@ Style/SingleLineBlockParams:
691
707
  Enabled: false
692
708
  Style/SingleLineMethods:
693
709
  Enabled: false
710
+ Style/SlicingWithRange:
711
+ Enabled: false
694
712
  Style/SpecialGlobalVars:
695
713
  Enabled: false
696
714
  Style/StabbyLambdaParentheses:
@@ -764,4 +782,4 @@ Security/MarshalLoad:
764
782
  Security/Open:
765
783
  Enabled: false
766
784
  Security/YAMLLoad:
767
- Enabled: false
785
+ Enabled: false
@@ -35,6 +35,7 @@ AllCops:
35
35
  - '**/*.watchr'
36
36
  - '**/.irbrc'
37
37
  - '**/.pryrc'
38
+ - '**/.simplecov'
38
39
  - '**/buildfile'
39
40
  - '**/Appraisals'
40
41
  - '**/Berksfile'
@@ -53,6 +54,7 @@ AllCops:
53
54
  - '**/Podfile'
54
55
  - '**/Puppetfile'
55
56
  - '**/Rakefile'
57
+ - '**/rakefile'
56
58
  - '**/Snapfile'
57
59
  - '**/Steepfile'
58
60
  - '**/Thorfile'
@@ -97,6 +99,14 @@ AllCops:
97
99
  # to true in the same configuration.
98
100
  EnabledByDefault: false
99
101
  DisabledByDefault: false
102
+ # New cops introduced between major versions are set to a special pending status
103
+ # and are not enabled by default with warning message.
104
+ # Change this behavior by overriding either `NewCops: enable` or `NewCops: disable`.
105
+ # When `NewCops` is `enable`, pending cops are enabled in bulk. Can be overridden by
106
+ # the `--enable-pending-cops` command-line option.
107
+ # When `NewCops` is `disable`, pending cops are disabled in bulk. Can be overridden by
108
+ # the `--disable-pending-cops` command-line option.
109
+ NewCops: pending
100
110
  # Enables the result cache if `true`. Can be overridden by the `--cache` command
101
111
  # line option.
102
112
  UseCache: true
@@ -125,7 +135,7 @@ AllCops:
125
135
  # followed by the Gemfile.lock or gems.locked file. (Although the Ruby version
126
136
  # is specified in the Gemfile or gems.rb file, RuboCop reads the final value
127
137
  # from the lock file.) If the Ruby version is still unresolved, RuboCop will
128
- # use the oldest officially supported Ruby version (currently Ruby 2.3).
138
+ # use the oldest officially supported Ruby version (currently Ruby 2.4).
129
139
  TargetRubyVersion: ~
130
140
 
131
141
  #################### Bundler ###############################
@@ -143,12 +153,13 @@ Bundler/GemComment:
143
153
  Description: 'Add a comment describing each gem.'
144
154
  Enabled: false
145
155
  VersionAdded: '0.59'
146
- VersionChanged: '0.77'
156
+ VersionChanged: '0.85'
147
157
  Include:
148
158
  - '**/*.gemfile'
149
159
  - '**/Gemfile'
150
160
  - '**/gems.rb'
151
161
  IgnoredGems: []
162
+ OnlyFor: []
152
163
 
153
164
  Bundler/InsecureProtocolSource:
154
165
  Description: >-
@@ -367,6 +378,7 @@ Layout/ConditionPosition:
367
378
  StyleGuide: '#same-line-condition'
368
379
  Enabled: true
369
380
  VersionAdded: '0.53'
381
+ VersionChanged: '0.83'
370
382
 
371
383
  Layout/DefEndAlignment:
372
384
  Description: 'Align ends corresponding to defs correctly.'
@@ -452,6 +464,19 @@ Layout/EmptyLinesAroundArguments:
452
464
  Enabled: true
453
465
  VersionAdded: '0.52'
454
466
 
467
+ Layout/EmptyLinesAroundAttributeAccessor:
468
+ Description: "Keep blank lines around attribute accessors."
469
+ StyleGuide: '#empty-lines-around-attribute-accessor'
470
+ Enabled: pending
471
+ VersionAdded: '0.83'
472
+ VersionChanged: '0.84'
473
+ AllowAliasSyntax: true
474
+ AllowedMethods:
475
+ - alias_method
476
+ - public
477
+ - protected
478
+ - private
479
+
455
480
  Layout/EmptyLinesAroundBeginBody:
456
481
  Description: "Keeps track of empty lines around begin-end bodies."
457
482
  StyleGuide: '#empty-lines-around-bodies'
@@ -766,13 +791,7 @@ Layout/HeredocIndentation:
766
791
  StyleGuide: '#squiggly-heredocs'
767
792
  Enabled: true
768
793
  VersionAdded: '0.49'
769
- VersionChanged: '0.77'
770
- EnforcedStyle: squiggly
771
- SupportedStyles:
772
- - squiggly
773
- - active_support
774
- - powerpack
775
- - unindent
794
+ VersionChanged: '0.85'
776
795
 
777
796
  Layout/IndentationConsistency:
778
797
  Description: 'Keep indentation straight.'
@@ -793,6 +812,22 @@ Layout/IndentationConsistency:
793
812
  # A reference to `EnforcedStyle: indented_internal_methods`.
794
813
  - https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions
795
814
 
815
+ Layout/IndentationStyle:
816
+ Description: 'Consistent indentation either with tabs only or spaces only.'
817
+ StyleGuide: '#spaces-indentation'
818
+ Enabled: true
819
+ VersionAdded: '0.49'
820
+ VersionChanged: '0.82'
821
+ # By default, the indentation width from Layout/IndentationWidth is used
822
+ # But it can be overridden by setting this parameter
823
+ # It is used during auto-correction to determine how many spaces should
824
+ # replace each tab.
825
+ IndentationWidth: ~
826
+ EnforcedStyle: spaces
827
+ SupportedStyles:
828
+ - spaces
829
+ - tabs
830
+
796
831
  Layout/IndentationWidth:
797
832
  Description: 'Use 2 spaces for indentation.'
798
833
  StyleGuide: '#spaces-indentation'
@@ -824,13 +859,13 @@ Layout/LeadingEmptyLines:
824
859
  VersionChanged: '0.77'
825
860
 
826
861
  Layout/LineLength:
827
- Description: 'Limit lines to 80 characters.'
828
- StyleGuide: '#80-character-limits'
862
+ Description: 'Checks that line length does not exceed the configured limit.'
863
+ StyleGuide: '#max-line-length'
829
864
  Enabled: true
830
865
  VersionAdded: '0.25'
831
- VersionChanged: '0.78'
866
+ VersionChanged: '0.84'
832
867
  AutoCorrect: false
833
- Max: 80
868
+ Max: 120
834
869
  # To make it possible to copy or click on URIs in the code, we allow lines
835
870
  # containing a URI to be longer than Max.
836
871
  AllowHeredoc: true
@@ -1080,6 +1115,11 @@ Layout/SpaceAroundKeyword:
1080
1115
  Enabled: true
1081
1116
  VersionAdded: '0.49'
1082
1117
 
1118
+ Layout/SpaceAroundMethodCallOperator:
1119
+ Description: 'Checks method call operators to not have spaces around them.'
1120
+ Enabled: pending
1121
+ VersionAdded: '0.82'
1122
+
1083
1123
  Layout/SpaceAroundOperators:
1084
1124
  Description: 'Use a single space around operators.'
1085
1125
  StyleGuide: '#spaces-operators'
@@ -1250,18 +1290,6 @@ Layout/SpaceInsideStringInterpolation:
1250
1290
  - space
1251
1291
  - no_space
1252
1292
 
1253
- Layout/Tab:
1254
- Description: 'No hard tabs.'
1255
- StyleGuide: '#spaces-indentation'
1256
- Enabled: true
1257
- VersionAdded: '0.49'
1258
- VersionChanged: '0.51'
1259
- # By default, the indentation width from Layout/IndentationWidth is used
1260
- # But it can be overridden by setting this parameter
1261
- # It is used during auto-correction to determine how many spaces should
1262
- # replace each tab.
1263
- IndentationWidth: ~
1264
-
1265
1293
  Layout/TrailingEmptyLines:
1266
1294
  Description: 'Checks trailing blank lines and final newline.'
1267
1295
  StyleGuide: '#newline-eof'
@@ -1278,8 +1306,8 @@ Layout/TrailingWhitespace:
1278
1306
  StyleGuide: '#no-trailing-whitespace'
1279
1307
  Enabled: true
1280
1308
  VersionAdded: '0.49'
1281
- VersionChanged: '0.55'
1282
- AllowInHeredoc: false
1309
+ VersionChanged: '0.83'
1310
+ AllowInHeredoc: true
1283
1311
 
1284
1312
  #################### Lint ##################################
1285
1313
  ### Warnings
@@ -1299,6 +1327,7 @@ Lint/AmbiguousOperator:
1299
1327
  StyleGuide: '#method-invocation-parens'
1300
1328
  Enabled: true
1301
1329
  VersionAdded: '0.17'
1330
+ VersionChanged: '0.83'
1302
1331
 
1303
1332
  Lint/AmbiguousRegexpLiteral:
1304
1333
  Description: >-
@@ -1306,6 +1335,7 @@ Lint/AmbiguousRegexpLiteral:
1306
1335
  a method invocation without parentheses.
1307
1336
  Enabled: true
1308
1337
  VersionAdded: '0.17'
1338
+ VersionChanged: '0.83'
1309
1339
 
1310
1340
  Lint/AssignmentInCondition:
1311
1341
  Description: "Don't use assignment in conditions."
@@ -1322,8 +1352,9 @@ Lint/BigDecimalNew:
1322
1352
  Lint/BooleanSymbol:
1323
1353
  Description: 'Check for `:true` and `:false` symbols.'
1324
1354
  Enabled: true
1355
+ Safe: false
1325
1356
  VersionAdded: '0.50'
1326
- VersionChanged: '0.81'
1357
+ VersionChanged: '0.83'
1327
1358
 
1328
1359
  Lint/CircularArgumentReference:
1329
1360
  Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
@@ -1341,6 +1372,11 @@ Lint/DeprecatedClassMethods:
1341
1372
  Enabled: true
1342
1373
  VersionAdded: '0.19'
1343
1374
 
1375
+ Lint/DeprecatedOpenSSLConstant:
1376
+ Description: "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`."
1377
+ Enabled: pending
1378
+ VersionAdded: '0.84'
1379
+
1344
1380
  Lint/DisjunctiveAssignmentInConstructor:
1345
1381
  Description: 'In constructor, plain assignment is preferred over disjunctive.'
1346
1382
  Enabled: true
@@ -1394,13 +1430,16 @@ Lint/EmptyInterpolation:
1394
1430
  Lint/EmptyWhen:
1395
1431
  Description: 'Checks for `when` branches with empty bodies.'
1396
1432
  Enabled: true
1433
+ AllowComments: true
1397
1434
  VersionAdded: '0.45'
1435
+ VersionChanged: '0.83'
1398
1436
 
1399
1437
  Lint/EnsureReturn:
1400
1438
  Description: 'Do not use return in an ensure block.'
1401
1439
  StyleGuide: '#no-return-ensure'
1402
1440
  Enabled: true
1403
1441
  VersionAdded: '0.9'
1442
+ VersionChanged: '0.83'
1404
1443
 
1405
1444
  Lint/ErbNewArguments:
1406
1445
  Description: 'Use `:trim_mode` and `:eoutvar` keyword arguments to `ERB.new`.'
@@ -1494,6 +1533,11 @@ Lint/MissingCopEnableDirective:
1494
1533
  # .inf for any size
1495
1534
  MaximumRangeSize: .inf
1496
1535
 
1536
+ Lint/MixedRegexpCaptureTypes:
1537
+ Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
1538
+ Enabled: pending
1539
+ VersionAdded: '0.85'
1540
+
1497
1541
  Lint/MultipleComparison:
1498
1542
  Description: "Use `&&` operator to compare multiple values."
1499
1543
  Enabled: true
@@ -1548,6 +1592,7 @@ Lint/ParenthesesAsGroupedExpression:
1548
1592
  StyleGuide: '#parens-no-spaces'
1549
1593
  Enabled: true
1550
1594
  VersionAdded: '0.12'
1595
+ VersionChanged: '0.83'
1551
1596
 
1552
1597
  Lint/PercentStringArray:
1553
1598
  Description: >-
@@ -1567,6 +1612,8 @@ Lint/RaiseException:
1567
1612
  StyleGuide: '#raise-exception'
1568
1613
  Enabled: pending
1569
1614
  VersionAdded: '0.81'
1615
+ AllowedImplicitNamespaces:
1616
+ - 'Gem'
1570
1617
 
1571
1618
  Lint/RandOne:
1572
1619
  Description: >-
@@ -1789,7 +1836,7 @@ Lint/UselessAccessModifier:
1789
1836
  Description: 'Checks for useless access modifiers.'
1790
1837
  Enabled: true
1791
1838
  VersionAdded: '0.20'
1792
- VersionChanged: '0.47'
1839
+ VersionChanged: '0.83'
1793
1840
  ContextCreatingMethods: []
1794
1841
  MethodCreatingMethods: []
1795
1842
 
@@ -1964,6 +2011,11 @@ Naming/ClassAndModuleCamelCase:
1964
2011
  StyleGuide: '#camelcase-classes'
1965
2012
  Enabled: true
1966
2013
  VersionAdded: '0.50'
2014
+ VersionChanged: '0.85'
2015
+ # Allowed class/module names can be specified here.
2016
+ # These can be full or part of the name.
2017
+ AllowedNames:
2018
+ - module_parent
1967
2019
 
1968
2020
  Naming/ConstantName:
1969
2021
  Description: 'Constants should use SCREAMING_SNAKE_CASE.'
@@ -1984,6 +2036,10 @@ Naming/FileName:
1984
2036
  # It further expects it to be nested inside modules which match the names
1985
2037
  # of subdirectories in its path.
1986
2038
  ExpectMatchingDefinition: false
2039
+ # When `false`, changes the behavior of ExpectMatchingDefinition to match only
2040
+ # whether each source file's class or module name matches the file name --
2041
+ # not whether the nested module hierarchy matches the subdirectory path.
2042
+ CheckDefinitionPathHierarchy: true
1987
2043
  # If non-`nil`, expect all source file names to match the following regex.
1988
2044
  # Only the file name itself is matched, not the entire file path.
1989
2045
  # Use anchors as necessary if you want to match the entire name rather than
@@ -2175,7 +2231,7 @@ Security/JSONLoad:
2175
2231
  Description: >-
2176
2232
  Prefer usage of `JSON.parse` over `JSON.load` due to potential
2177
2233
  security issues. See reference for more information.
2178
- Reference: 'https://ruby-doc.org/stdlib-2.3.0/libdoc/json/rdoc/JSON.html#method-i-load'
2234
+ Reference: 'https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html#method-i-load'
2179
2235
  Enabled: true
2180
2236
  VersionAdded: '0.43'
2181
2237
  VersionChanged: '0.44'
@@ -2188,7 +2244,7 @@ Security/MarshalLoad:
2188
2244
  Description: >-
2189
2245
  Avoid using of `Marshal.load` or `Marshal.restore` due to potential
2190
2246
  security issues. See reference for more information.
2191
- Reference: 'https://ruby-doc.org/core-2.3.3/Marshal.html#module-Marshal-label-Security+considerations'
2247
+ Reference: 'https://ruby-doc.org/core-2.7.0/Marshal.html#module-Marshal-label-Security+considerations'
2192
2248
  Enabled: true
2193
2249
  VersionAdded: '0.47'
2194
2250
 
@@ -2202,7 +2258,7 @@ Security/YAMLLoad:
2202
2258
  Description: >-
2203
2259
  Prefer usage of `YAML.safe_load` over `YAML.load` due to potential
2204
2260
  security issues. See reference for more information.
2205
- Reference: 'https://ruby-doc.org/stdlib-2.3.3/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security'
2261
+ Reference: 'https://ruby-doc.org/stdlib-2.7.0/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security'
2206
2262
  Enabled: true
2207
2263
  VersionAdded: '0.47'
2208
2264
  SafeAutoCorrect: false
@@ -2239,7 +2295,7 @@ Style/AndOr:
2239
2295
  VersionChanged: '0.25'
2240
2296
  # Whether `and` and `or` are banned only in conditionals (conditionals)
2241
2297
  # or completely (always).
2242
- EnforcedStyle: always
2298
+ EnforcedStyle: conditionals
2243
2299
  SupportedStyles:
2244
2300
  - always
2245
2301
  - conditionals
@@ -2409,6 +2465,15 @@ Style/CaseEquality:
2409
2465
  StyleGuide: '#no-case-equality'
2410
2466
  Enabled: true
2411
2467
  VersionAdded: '0.9'
2468
+ # If AllowOnConstant is enabled, the cop will ignore violations when the receiver of
2469
+ # the case equality operator is a constant.
2470
+ #
2471
+ # # bad
2472
+ # /string/ === "string"
2473
+ #
2474
+ # # good
2475
+ # String === "string"
2476
+ AllowOnConstant: false
2412
2477
 
2413
2478
  Style/CharacterLiteral:
2414
2479
  Description: 'Checks for uses of character literals.'
@@ -2449,6 +2514,7 @@ Style/ClassAndModuleChildren:
2449
2514
 
2450
2515
  Style/ClassCheck:
2451
2516
  Description: 'Enforces consistent use of `Object#is_a?` or `Object#kind_of?`.'
2517
+ StyleGuide: '#is-a-vs-kind-of'
2452
2518
  Enabled: true
2453
2519
  VersionAdded: '0.24'
2454
2520
  EnforcedStyle: is_a?
@@ -2616,6 +2682,12 @@ Style/Dir:
2616
2682
  Enabled: true
2617
2683
  VersionAdded: '0.50'
2618
2684
 
2685
+ Style/DisableCopsWithinSourceCodeDirective:
2686
+ Description: >-
2687
+ Forbids disabling/enabling cops within source code.
2688
+ Enabled: false
2689
+ VersionAdded: '0.82'
2690
+
2619
2691
  Style/Documentation:
2620
2692
  Description: 'Document classes and non-namespace modules.'
2621
2693
  Enabled: true
@@ -2643,6 +2715,11 @@ Style/DoubleNegation:
2643
2715
  StyleGuide: '#no-bang-bang'
2644
2716
  Enabled: true
2645
2717
  VersionAdded: '0.19'
2718
+ VersionChanged: '0.84'
2719
+ EnforcedStyle: allowed_in_returns
2720
+ SupportedStyles:
2721
+ - allowed_in_returns
2722
+ - forbidden
2646
2723
 
2647
2724
  Style/EachForSimpleLoop:
2648
2725
  Description: >-
@@ -2734,6 +2811,17 @@ Style/ExpandPathArguments:
2734
2811
  Enabled: true
2735
2812
  VersionAdded: '0.53'
2736
2813
 
2814
+ Style/ExponentialNotation:
2815
+ Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
2816
+ StyleGuide: '#exponential-notation'
2817
+ Enabled: pending
2818
+ VersionAdded: '0.82'
2819
+ EnforcedStyle: scientific
2820
+ SupportedStyles:
2821
+ - scientific
2822
+ - engineering
2823
+ - integral
2824
+
2737
2825
  Style/FloatDivision:
2738
2826
  Description: 'For performing float division, coerce one side only.'
2739
2827
  StyleGuide: '#float-division'
@@ -2795,8 +2883,7 @@ Style/FrozenStringLiteralComment:
2795
2883
  SupportedStyles:
2796
2884
  # `always` will always add the frozen string literal comment to a file
2797
2885
  # regardless of the Ruby version or if `freeze` or `<<` are called on a
2798
- # string literal. If you run code against multiple versions of Ruby, it is
2799
- # possible that this will create errors in Ruby 2.3.0+.
2886
+ # string literal. It is possible that this will create errors.
2800
2887
  - always
2801
2888
  # `always_true` will add the frozen string literal comment to a file,
2802
2889
  # similarly to the `always` style, but will also change any disabled
@@ -2902,6 +2989,7 @@ Style/IfWithSemicolon:
2902
2989
  StyleGuide: '#no-semicolon-ifs'
2903
2990
  Enabled: true
2904
2991
  VersionAdded: '0.9'
2992
+ VersionChanged: '0.83'
2905
2993
 
2906
2994
  Style/ImplicitRuntimeError:
2907
2995
  Description: >-
@@ -3379,7 +3467,9 @@ Style/OptionalArguments:
3379
3467
  of the argument list.
3380
3468
  StyleGuide: '#optional-arguments'
3381
3469
  Enabled: true
3470
+ Safe: false
3382
3471
  VersionAdded: '0.33'
3472
+ VersionChanged: '0.83'
3383
3473
 
3384
3474
  Style/OrAssignment:
3385
3475
  Description: 'Recommend usage of double pipe equals (||=) where applicable.'
@@ -3528,6 +3618,16 @@ Style/RedundantPercentQ:
3528
3618
  Enabled: true
3529
3619
  VersionAdded: '0.76'
3530
3620
 
3621
+ Style/RedundantRegexpCharacterClass:
3622
+ Description: 'Checks for unnecessary single-element Regexp character classes.'
3623
+ Enabled: pending
3624
+ VersionAdded: '0.85'
3625
+
3626
+ Style/RedundantRegexpEscape:
3627
+ Description: 'Checks for redundant escapes in Regexps.'
3628
+ Enabled: pending
3629
+ VersionAdded: '0.85'
3630
+
3531
3631
  Style/RedundantReturn:
3532
3632
  Description: "Don't use return where it's not required."
3533
3633
  StyleGuide: '#no-explicit-return'
@@ -3684,6 +3784,12 @@ Style/SingleLineMethods:
3684
3784
  VersionChanged: '0.19'
3685
3785
  AllowIfMethodIsEmpty: true
3686
3786
 
3787
+ Style/SlicingWithRange:
3788
+ Description: 'Checks array slicing is done with endless ranges when suitable.'
3789
+ Enabled: pending
3790
+ VersionAdded: '0.83'
3791
+ Safe: false
3792
+
3687
3793
  Style/SpecialGlobalVars:
3688
3794
  Description: 'Avoid Perl-style global variables.'
3689
3795
  StyleGuide: '#no-cryptic-perlisms'