cookstyle 6.5.3 → 6.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/config/cookstyle.yml +296 -12
  4. data/config/disable_all.yml +12 -0
  5. data/config/upstream.yml +82 -19
  6. data/lib/cookstyle.rb +2 -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/invalid_version_metadata.rb +1 -1
  12. data/lib/rubocop/cop/chef/correctness/lazy_eval_node_attribute_defaults.rb +56 -0
  13. data/lib/rubocop/cop/chef/correctness/openssl_password_helpers.rb +45 -0
  14. data/lib/rubocop/cop/chef/deprecation/hwrp_without_provides.rb +141 -0
  15. data/lib/rubocop/cop/chef/deprecation/resource_uses_only_resource_name.rb +86 -0
  16. data/lib/rubocop/cop/chef/deprecation/xml_ruby_recipe.rb +3 -3
  17. data/lib/rubocop/cop/chef/modernize/includes_mixin_shellout.rb +24 -3
  18. data/lib/rubocop/cop/chef/modernize/use_multipackage_installs.rb +8 -4
  19. data/lib/rubocop/cop/chef/redundant/multiple_platform_checks.rb +60 -0
  20. data/lib/rubocop/cop/chef/redundant/ohai_attribute_to_string.rb +68 -0
  21. data/lib/rubocop/cop/chef/sharing/include_resource_examples.rb +59 -0
  22. data/lib/rubocop/cop/chef/sharing/invalid_license_string.rb +1 -1
  23. data/lib/rubocop/monkey_patches/registry_cop.rb +14 -0
  24. data/lib/rubocop/monkey_patches/team.rb +24 -0
  25. metadata +15 -6
  26. data/lib/rubocop/cop/chef/deprecation/resource_without_name_or_provides.rb +0 -81
  27. data/lib/rubocop/monkey_patches/commissioner.rb +0 -26
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84025c0a2c14cea15521215fabb39dd043ad6de8f1bb712ffa66fd0350287b5f
4
- data.tar.gz: 1df6c910b7d68aeb649a4e372964047ee059b5220a3db4d1ee3d2a69013c288f
3
+ metadata.gz: fe8edd0728c5a74a2496aa1fea1093bbcafbe584b37c2e3a65edc1103fa8580d
4
+ data.tar.gz: 11abc23f923ef8b0e50bb91223cedc33c6b230ba1d30c2f4d37feb49df1452e4
5
5
  SHA512:
6
- metadata.gz: f71145c0012b288b97112ba4bf0e0255b53f2e0d2e6d8e460bd182eaa7d8f41213cd91420e7b759b1c8cd7883ee5727b54dc7aa7cc54d93986691b3f8d729e78
7
- data.tar.gz: 4ec0deaaf4c3aad4de6f88c988c90f502682c6f944d19c199a82c735cbee651c2e3b1088bcef5ebe694674a6d04d44735d6792aba005059336f4bde83631f4c2
6
+ metadata.gz: 779695f4dd5a791a76ba01c59debefcc697826bbd3bbe2663369163a0d451d703dfc30f28c44017e34f9574c7c6365690ed1a4839fe116e51e1a42037bfb7144
7
+ data.tar.gz: 87aed3d5935014296eae0b5280ef942011e31a546e92391d604eb581fcd0ea8f0882f03b08a50633c18ed876acbe895fc8dbd653adcd3345ac70a683b30afceb
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ gemspec
6
6
  group :debug do
7
7
  gem 'pry'
8
8
  gem 'pry-byebug'
9
- gem 'pry-stack_explorer'
9
+ gem 'pry-stack_explorer', '~> 0.4.0' # 0.5.0 drops support for Ruby < 2.6
10
10
  end
11
11
 
12
12
  group :docs do
@@ -31,8 +31,12 @@ AllCops:
31
31
  # ChefStyle: Making cookbooks look better
32
32
  ###############################
33
33
 
34
+ ChefStyle:
35
+ StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefstyle.md
36
+
34
37
  ChefStyle/AttributeKeys:
35
38
  Description: Check which style of keys are used to access node attributes.
39
+ StyleGuide: '#chefstyleattributekeys'
36
40
  Enabled: true
37
41
  EnforcedStyle: strings
38
42
  VersionAdded: '5.0.0'
@@ -44,16 +48,19 @@ ChefStyle/AttributeKeys:
44
48
 
45
49
  ChefStyle/CopyrightCommentFormat:
46
50
  Description: Properly format copyright dates in comment blocks and ensure dates are up to date
51
+ StyleGuide: '#chefstylecopyrightcommentformat'
47
52
  Enabled: false
48
53
  VersionAdded: '5.0.0'
49
54
 
50
55
  ChefStyle/CommentSentenceSpacing:
51
56
  Description: Use a single space after sentences in comments
57
+ StyleGuide: '#chefstylecommentsentencespacing'
52
58
  Enabled: false
53
59
  VersionAdded: '5.1.0'
54
60
 
55
61
  ChefStyle/CommentFormat:
56
62
  Description: Use Chef's unique format for comment headers
63
+ StyleGuide: '#chefstylecommentformat'
57
64
  Enabled: true
58
65
  VersionAdded: '5.0.0'
59
66
  Exclude:
@@ -61,6 +68,7 @@ ChefStyle/CommentFormat:
61
68
 
62
69
  ChefStyle/FileMode:
63
70
  Description: Use strings to represent file modes in Chef resources
71
+ StyleGuide: '#chefstylefilemode'
64
72
  Enabled: true
65
73
  VersionAdded: '5.0.0'
66
74
  Exclude:
@@ -70,6 +78,7 @@ ChefStyle/FileMode:
70
78
 
71
79
  ChefStyle/UsePlatformHelpers:
72
80
  Description: Use platform? and platform_family? helpers to check node platform in resources and recipes
81
+ StyleGuide: '#chefstyleuseplatformhelpers'
73
82
  Enabled: true
74
83
  VersionAdded: '5.6.0'
75
84
  Exclude:
@@ -79,6 +88,7 @@ ChefStyle/UsePlatformHelpers:
79
88
 
80
89
  ChefStyle/SimplifyPlatformMajorVersionCheck:
81
90
  Description: Use node['platform_version'].to_i instead of node['platform_version'].split('.').first or node['platform_version'].split('.')[0]
91
+ StyleGuide: '#chefstylesimplifyplatformmajorversioncheck'
82
92
  Enabled: true
83
93
  VersionAdded: '5.8.0'
84
94
  Exclude:
@@ -87,11 +97,13 @@ ChefStyle/SimplifyPlatformMajorVersionCheck:
87
97
 
88
98
  ChefStyle/DefaultCopyrightComments:
89
99
  Description: Cookbook copyright comment headers should be updated for a real person or organization.
100
+ StyleGuide: '#chefstyledefaultcopyrightcomments'
90
101
  Enabled: true
91
102
  VersionAdded: '5.12.0'
92
103
 
93
104
  ChefStyle/UnnecessaryPlatformCaseStatement:
94
105
  Description: Use the platform?() and platform_family?() helpers instead of a case statement that only includes a single when statement.
106
+ StyleGuide: '#chefstyleunnecessaryplatformcasestatement'
95
107
  Enabled: true
96
108
  VersionAdded: '5.16.0'
97
109
  Exclude:
@@ -100,6 +112,7 @@ ChefStyle/UnnecessaryPlatformCaseStatement:
100
112
 
101
113
  ChefStyle/ImmediateNotificationTiming:
102
114
  Description: Use :immediately instead of :immediate for resource notification timing.
115
+ StyleGuide: '#chefstyleimmediatenotificationtiming'
103
116
  Enabled: true
104
117
  VersionAdded: '5.16.0'
105
118
  Exclude:
@@ -109,6 +122,7 @@ ChefStyle/ImmediateNotificationTiming:
109
122
 
110
123
  ChefStyle/TrueClassFalseClassResourceProperties:
111
124
  Description: When setting the allowed types for a resource to accept either true or false values it's much simpler to use true and false instead of TrueClass and FalseClass.
125
+ StyleGuide: '#chefstyletrueclassfalseclassresourceproperties'
112
126
  Enabled: true
113
127
  VersionAdded: '5.16.0'
114
128
  Include:
@@ -117,6 +131,7 @@ ChefStyle/TrueClassFalseClassResourceProperties:
117
131
 
118
132
  ChefStyle/OverlyComplexSupportsDependsMetadata:
119
133
  Description: Don't loop over an array to set cookbook dependencies or supported platforms if you have fewer than three values to set.
134
+ StyleGuide: '#chefstyleovercomplexsupportsdependsmetadata'
120
135
  Enabled: true
121
136
  VersionAdded: '5.19.0'
122
137
  Include:
@@ -124,11 +139,13 @@ ChefStyle/OverlyComplexSupportsDependsMetadata:
124
139
 
125
140
  ChefStyle/ChefWhaaat:
126
141
  Description: Do you mean Chef (the company) or a Chef product (e.g. Chef Infra, Chef InSpec, etc)?
142
+ StyleGuide: '#chefstylechefwhaaat'
127
143
  Enabled: false
128
144
  VersionAdded: '5.20.0'
129
145
 
130
146
  ChefStyle/UnnecessaryOSCheck:
131
147
  Description: Use the platform_family?() helpers instead of node['os] == 'foo' for platform_families that match 1:1 with OS values. These helpers are easier to read and can accept multiple platform arguments, which greatly simplifies complex platform logic.
148
+ StyleGuide: '#chefstyleunnecessaryoscheck'
132
149
  Enabled: true
133
150
  VersionAdded: '5.21.0'
134
151
  Exclude:
@@ -137,6 +154,7 @@ ChefStyle/UnnecessaryOSCheck:
137
154
 
138
155
  ChefStyle/NegatingOnlyIf:
139
156
  Description: Use not_if instead of only_if that negates the Ruby statement with a !
157
+ StyleGuide: '#chefstylenegatingonlyif'
140
158
  VersionAdded: '6.2.0'
141
159
  Enabled: true
142
160
  Exclude:
@@ -147,8 +165,12 @@ ChefStyle/NegatingOnlyIf:
147
165
  # ChefCorrectness: Avoiding potential problems
148
166
  ###############################
149
167
 
168
+ ChefCorrectness:
169
+ StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefcorrectness.md
170
+
150
171
  ChefCorrectness/ServiceResource:
151
172
  Description: Use a service resource to start and stop services instead of execute resources
173
+ StyleGuide: '#chefcorrectnessserviceresource'
152
174
  Enabled: true
153
175
  VersionAdded: '5.0.0'
154
176
  Exclude:
@@ -158,6 +180,7 @@ ChefCorrectness/ServiceResource:
158
180
 
159
181
  ChefCorrectness/NodeNormal:
160
182
  Description: Do not use the node.normal method
183
+ StyleGuide: '#chefcorrectnessnodenormal'
161
184
  Enabled: true
162
185
  VersionAdded: '5.1.0'
163
186
  Exclude:
@@ -174,6 +197,7 @@ ChefCorrectness/NodeNormalUnless:
174
197
 
175
198
  ChefCorrectness/TmpPath:
176
199
  Description: Use file_cache_path rather than hard-coding tmp paths
200
+ StyleGuide: '#chefcorrectnessnodenormalunless'
177
201
  Enabled: true
178
202
  VersionAdded: '5.0.0'
179
203
  Exclude:
@@ -182,6 +206,7 @@ ChefCorrectness/TmpPath:
182
206
 
183
207
  ChefCorrectness/InvalidPlatformMetadata:
184
208
  Description: metadata.rb "supports" platform is invalid
209
+ StyleGuide: '#chefcorrectnessinvalidplatformmetadata'
185
210
  Enabled: true
186
211
  VersionAdded: '5.2.0'
187
212
  Include:
@@ -189,6 +214,7 @@ ChefCorrectness/InvalidPlatformMetadata:
189
214
 
190
215
  ChefCorrectness/CookbookUsesNodeSave:
191
216
  Description: Don't use node.save to save partial node data to the Chef Infra Server mid-run unless it's absolutely necessary. Node.save can result in failed Chef Infra runs appearing in search and increases load on the Chef Infra Server.
217
+ StyleGuide: '#chefcorrectnesscookbookusesnodesave'
192
218
  Enabled: true
193
219
  VersionAdded: '5.5.0'
194
220
  Exclude:
@@ -197,13 +223,15 @@ ChefCorrectness/CookbookUsesNodeSave:
197
223
 
198
224
  ChefCorrectness/CookbooksDependsOnSelf:
199
225
  Description: A cookbook cannot depend on itself
226
+ StyleGuide: '#chefcorrectnesscookbooksdependonself'
200
227
  Enabled: true
201
228
  VersionAdded: '5.2.0'
202
229
  Include:
203
230
  - '**/metadata.rb'
204
231
 
205
232
  ChefCorrectness/MetadataMissingName:
206
- Description: MetadataMissingName
233
+ Description: The metadata.rb file is missing the name field which is required by Chef Infra Client 12 and later
234
+ StyleGuide: '#chefcorrectnessmetadatamissingname'
207
235
  Enabled: true
208
236
  VersionAdded: '5.2.0'
209
237
  Include:
@@ -211,6 +239,7 @@ ChefCorrectness/MetadataMissingName:
211
239
 
212
240
  ChefCorrectness/BlockGuardWithOnlyString:
213
241
  Description: A resource guard (not_if/only_if) that is a string should not be wrapped in {}. Wrapping a guard string in {} causes it be executed as Ruby code which will always returns true instead of a shell command that will actually run.
242
+ StyleGuide: '#chefcorrectnessblockguardwithonlystring'
214
243
  Enabled: true
215
244
  VersionAdded: '5.2.0'
216
245
  Exclude:
@@ -220,6 +249,7 @@ ChefCorrectness/BlockGuardWithOnlyString:
220
249
 
221
250
  ChefCorrectness/ResourceSetsInternalProperties:
222
251
  Description: Do not set properties used internally by Chef Infra Client to track the system state.
252
+ StyleGuide: '#chefcorrectnessresourcesetsinternalproperties'
223
253
  Enabled: true
224
254
  VersionAdded: '5.5.0'
225
255
  Exclude:
@@ -229,6 +259,7 @@ ChefCorrectness/ResourceSetsInternalProperties:
229
259
 
230
260
  ChefCorrectness/ResourceSetsNameProperty:
231
261
  Description: Resource sets the name property in the resource instead of using a name_property.
262
+ StyleGuide: '#chefcorrectnessresourcesetsnameproperty'
232
263
  Enabled: true
233
264
  VersionAdded: '5.5.0'
234
265
  Exclude:
@@ -238,6 +269,7 @@ ChefCorrectness/ResourceSetsNameProperty:
238
269
 
239
270
  ChefCorrectness/ResourceWithNoneAction:
240
271
  Description: Resource uses the nonexistent :none action instead of the :nothing action
272
+ StyleGuide: '#chefcorrectnessresourcewithnoneaction'
241
273
  Enabled: true
242
274
  VersionAdded: '5.5.0'
243
275
  Exclude:
@@ -247,6 +279,7 @@ ChefCorrectness/ResourceWithNoneAction:
247
279
 
248
280
  ChefCorrectness/InvalidVersionMetadata:
249
281
  Description: Cookbook metadata.rb version field should follow X.Y.Z version format.
282
+ StyleGuide: '#chefcorrectnessinvalidversionmetadata'
250
283
  Enabled: true
251
284
  VersionAdded: '5.8.0'
252
285
  Include:
@@ -254,6 +287,7 @@ ChefCorrectness/InvalidVersionMetadata:
254
287
 
255
288
  ChefCorrectness/NotifiesActionNotSymbol:
256
289
  Description: When notifying or subscribing an action within a resource the action should always be a symbol. In Chef Infra Client releases before 14.0 this may result in double notification.
290
+ StyleGuide: '#chefcorrectnessnotifiesactionnotsymbol'
257
291
  Enabled: true
258
292
  VersionAdded: '5.10.0'
259
293
  Exclude:
@@ -263,6 +297,7 @@ ChefCorrectness/NotifiesActionNotSymbol:
263
297
 
264
298
  ChefCorrectness/IncorrectLibraryInjection:
265
299
  Description: Libraries should be injected into the Chef::DSL::Recipe or Chef::DSL::Resource classes and not Recipe/Resource/Provider classes directly.
300
+ StyleGuide: '#chefcorrectnessincorrectlibraryinjection'
266
301
  Enabled: true
267
302
  VersionAdded: '5.10.0'
268
303
  Include:
@@ -270,6 +305,7 @@ ChefCorrectness/IncorrectLibraryInjection:
270
305
 
271
306
  ChefCorrectness/InvalidPlatformHelper:
272
307
  Description: Pass valid platforms to the platform? helper.
308
+ StyleGuide: '#chefcorrectnessinvalidplatformhelper'
273
309
  Enabled: true
274
310
  VersionAdded: '5.15.0'
275
311
  Exclude:
@@ -278,6 +314,7 @@ ChefCorrectness/InvalidPlatformHelper:
278
314
 
279
315
  ChefCorrectness/InvalidPlatformFamilyHelper:
280
316
  Description: Pass valid platform families to the platform_family? helper.
317
+ StyleGuide: '#chefcorrectnessinvalidplatformfamilyhelper'
281
318
  Enabled: true
282
319
  VersionAdded: '5.15.0'
283
320
  Exclude:
@@ -286,6 +323,7 @@ ChefCorrectness/InvalidPlatformFamilyHelper:
286
323
 
287
324
  ChefCorrectness/ScopedFileExist:
288
325
  Description: Scope file exist to access the correct File class by using ::File.exist? not File.exist?.
326
+ StyleGuide: '#chefcorrectnessscopedfileexist'
289
327
  Enabled: true
290
328
  VersionAdded: '5.15.0'
291
329
  Exclude:
@@ -295,6 +333,7 @@ ChefCorrectness/ScopedFileExist:
295
333
 
296
334
  ChefCorrectness/InvalidPlatformValueForPlatformFamilyHelper:
297
335
  Description: Pass valid platforms families to the value_for_platform_family helper.
336
+ StyleGuide: '#chefcorrectnessinvalidplatformvalueforplatformfamilyhelper'
298
337
  Enabled: true
299
338
  VersionAdded: '5.15.0'
300
339
  Exclude:
@@ -303,6 +342,7 @@ ChefCorrectness/InvalidPlatformValueForPlatformFamilyHelper:
303
342
 
304
343
  ChefCorrectness/InvalidPlatformValueForPlatformHelper:
305
344
  Description: Pass valid platforms to the value_for_platform helper.
345
+ StyleGuide: '#chefcorrectnessinvalidplatformvalueforplatformhelper'
306
346
  Enabled: true
307
347
  VersionAdded: '5.15.0'
308
348
  Exclude:
@@ -311,6 +351,7 @@ ChefCorrectness/InvalidPlatformValueForPlatformHelper:
311
351
 
312
352
  ChefCorrectness/InvalidNotificationTiming:
313
353
  Description: Valid notification timings are :immediately, :immediate (alias for :immediately), :delayed, and :before.
354
+ StyleGuide: '#chefcorrectnessinvalidnotificationtiming'
314
355
  Enabled: true
315
356
  VersionAdded: '5.16.0'
316
357
  Exclude:
@@ -320,6 +361,7 @@ ChefCorrectness/InvalidNotificationTiming:
320
361
 
321
362
  ChefCorrectness/MalformedPlatformValueForPlatformHelper:
322
363
  Description: When using the value_for_platform helper you must include a hash of possible platforms where each platform contains a hash of versions and potential values. If you don't wish to match on a particular version you can instead use the key 'default'.
364
+ StyleGuide: '#chefcorrectnessmalformedplatformvalueforplatformhelper'
323
365
  Enabled: true
324
366
  VersionAdded: '5.16.0'
325
367
  Exclude:
@@ -328,6 +370,7 @@ ChefCorrectness/MalformedPlatformValueForPlatformHelper:
328
370
 
329
371
  ChefCorrectness/DnfPackageAllowDowngrades:
330
372
  Description: dnf_package does not support the allow_downgrades property
373
+ StyleGuide: '#chefcorrectnessdnfpackageallowdowngrades'
331
374
  Enabled: true
332
375
  VersionAdded: '5.16.0'
333
376
  Exclude:
@@ -337,6 +380,7 @@ ChefCorrectness/DnfPackageAllowDowngrades:
337
380
 
338
381
  ChefCorrectness/ChefApplicationFatal:
339
382
  Description: Use raise to force Chef Infra Client to fail instead of using Chef::Application.fatal
383
+ StyleGuide: '#chefcorrectnesschefapplicationfatal'
340
384
  Enabled: true
341
385
  VersionAdded: '6.0.0'
342
386
  Exclude:
@@ -345,6 +389,7 @@ ChefCorrectness/ChefApplicationFatal:
345
389
 
346
390
  ChefCorrectness/PowershellScriptDeleteFile:
347
391
  Description: Use the `file` or `directory` resources built into Chef Infra Client with the :delete action to remove files/directories instead of using Remove-Item in a powershell_script resource
392
+ StyleGuide: '#chefcorrectnesspowershellscriptdeletefiles'
348
393
  Enabled: true
349
394
  VersionAdded: '6.0.0'
350
395
  Exclude:
@@ -354,6 +399,7 @@ ChefCorrectness/PowershellScriptDeleteFile:
354
399
 
355
400
  ChefCorrectness/ConditionalRubyShellout:
356
401
  Description: Don't use Ruby to shellout in an only_if / not_if conditional when you can shellout directly by wrapping the command in quotes.
402
+ StyleGuide: '#chefcorrectnessconditionalrubyshellout'
357
403
  Enabled: true
358
404
  VersionAdded: '6.1.0'
359
405
  Exclude:
@@ -361,12 +407,52 @@ ChefCorrectness/ConditionalRubyShellout:
361
407
  - '**/metadata.rb'
362
408
  - '**/Berksfile'
363
409
 
410
+ ChefCorrectness/LazyEvalNodeAttributeDefaults:
411
+ Description: When setting a node attribute as a default value for a custom resource property, make sure to wrap the node attribute in `lazy {}` so that the node attribute is available when the resource executes.
412
+ StyleGuide: '#chefcorrectnesslazyevalnodeattributedefaults'
413
+ Enabled: true
414
+ VersionAdded: '6.6.0'
415
+ Include:
416
+ - '**/libraries/*.rb'
417
+ - '**/resources/*.rb'
418
+
419
+ ChefCorrectness/OpenSSLPasswordHelpers:
420
+ Description: The secure_password helper from the openssl cookbooks Opscode::OpenSSL::Password class should not be used to generate passwords.
421
+ StyleGuide: '#chefcorrectnessopensslpasswordhelpers'
422
+ Enabled: true
423
+ VersionAdded: '6.6.0'
424
+ Exclude:
425
+ - '**/metadata.rb'
426
+ - '**/Berksfile'
427
+
428
+ ChefCorrectness/InvalidPlatformFamilyInCase:
429
+ Description: Use valid platform family values in case statements.
430
+ StyleGuide: '#chefcorrectnessinvalidplatformfamilyincase'
431
+ Enabled: true
432
+ VersionAdded: '6.6.0'
433
+ Exclude:
434
+ - '**/metadata.rb'
435
+ - '**/Berksfile'
436
+
437
+ ChefCorrectness/InvalidPlatformInCase:
438
+ Description: Use valid platform values in case statements.
439
+ StyleGuide: '#chefcorrectnessinvalidplatformincase'
440
+ Enabled: true
441
+ VersionAdded: '6.6.0'
442
+ Exclude:
443
+ - '**/metadata.rb'
444
+ - '**/Berksfile'
445
+
364
446
  ###############################
365
447
  # ChefSharing: Issues that prevent sharing code with other teams or with the Chef community in general
366
448
  ###############################
367
449
 
450
+ ChefSharing:
451
+ StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefsharing.md
452
+
368
453
  ChefSharing/InsecureCookbookURL:
369
454
  Description: Insecure http Github or Gitlab URLs for metadata source_url/issues_url fields
455
+ StyleGuide: '#chefsharinginsecurecookbookurl'
370
456
  Enabled: true
371
457
  VersionAdded: '5.1.0'
372
458
  VersionChanged: '5.15.0'
@@ -375,6 +461,7 @@ ChefSharing/InsecureCookbookURL:
375
461
 
376
462
  ChefSharing/InvalidLicenseString:
377
463
  Description: Cookbook metadata.rb does not use a SPDX compliant license string or "all rights reserved"
464
+ StyleGuide: '#chefsharinginvalidlicensestring'
378
465
  Enabled: true
379
466
  VersionAdded: '5.2.0'
380
467
  VersionChanged: '5.15.0'
@@ -383,6 +470,7 @@ ChefSharing/InvalidLicenseString:
383
470
 
384
471
  ChefSharing/DefaultMetadataMaintainer:
385
472
  Description: Metadata contains default maintainer information from the cookbook generator. Add actual cookbook maintainer information to the metadata.rb.
473
+ StyleGuide: '#chefsharingdefaultmetadatamaintainer'
386
474
  Enabled: true
387
475
  VersionAdded: '5.4.0'
388
476
  VersionChanged: '5.15.0'
@@ -391,6 +479,7 @@ ChefSharing/DefaultMetadataMaintainer:
391
479
 
392
480
  ChefSharing/EmptyMetadataField:
393
481
  Description: metadata.rb should not include fields with an empty string. Either don't include the field or add a value.
482
+ StyleGuide: '#chefsharingemptymetadatafield'
394
483
  Enabled: true
395
484
  VersionAdded: '5.8.0'
396
485
  VersionChanged: '5.15.0'
@@ -399,6 +488,7 @@ ChefSharing/EmptyMetadataField:
399
488
 
400
489
  ChefSharing/IncludePropertyDescriptions:
401
490
  Description: Properties should include description fields to allow automated documention. Requires Chef Infra Client 13.9 or later.
491
+ StyleGuide: '#chefsharingincludepropetydescriptions'
402
492
  Enabled: false
403
493
  VersionAdded: '6.1.0'
404
494
  Include:
@@ -407,17 +497,30 @@ ChefSharing/IncludePropertyDescriptions:
407
497
 
408
498
  ChefSharing/IncludeResourceDescriptions:
409
499
  Description: Resources should include description fields to allow automated documention. Requires Chef Infra Client 13.9 or later.
500
+ StyleGuide: '#chefsharingincluderesourcedescriptions'
410
501
  Enabled: false
411
502
  VersionAdded: '6.1.0'
412
503
  Include:
413
504
  - '**/resources/*.rb'
414
505
 
506
+ ChefSharing/IncludeResourceExamples:
507
+ Description: Resources should include examples field to allow automated documention. Requires Chef Infra Client 13.9 or later.
508
+ StyleGuide: '#chefsharingincluderesourceexamples'
509
+ Enabled: false
510
+ VersionAdded: '6.10.0'
511
+ Include:
512
+ - '**/resources/*.rb'
513
+
415
514
  ###############################
416
515
  # ChefDeprecations: Resolving Deprecations that block upgrading Chef Infra Client
417
516
  ###############################
418
517
 
518
+ ChefDeprecations:
519
+ StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefdeprecations.md
520
+
419
521
  ChefDeprecations/NodeDeepFetch:
420
522
  Description: Do not use the deprecated chef-sugar node.deep_fetch methods
523
+ StyleGuide: '#chefdeprecationsnodedeepfetch'
421
524
  Enabled: true
422
525
  VersionAdded: '5.12.0'
423
526
  Exclude:
@@ -426,6 +529,7 @@ ChefDeprecations/NodeDeepFetch:
426
529
 
427
530
  ChefDeprecations/NodeSet:
428
531
  Description: Do not use the deprecated node.set method
532
+ StyleGuide: '#chefdeprecationsnodeset'
429
533
  Enabled: true
430
534
  VersionAdded: '5.0.0'
431
535
  Exclude:
@@ -434,6 +538,7 @@ ChefDeprecations/NodeSet:
434
538
 
435
539
  ChefDeprecations/NodeSetUnless:
436
540
  Description: Do not use the deprecated node.set_unless method
541
+ StyleGuide: '#chefdeprecationsnodesetunless'
437
542
  Enabled: true
438
543
  VersionAdded: '5.1.0'
439
544
  Exclude:
@@ -442,6 +547,7 @@ ChefDeprecations/NodeSetUnless:
442
547
 
443
548
  ChefDeprecations/EpicFail:
444
549
  Description: Use ignore_failure method instead of the deprecated epic_fail method
550
+ StyleGuide: '#chefdeprecationsepicfail'
445
551
  Enabled: true
446
552
  VersionAdded: '5.1.0'
447
553
  Exclude:
@@ -451,27 +557,31 @@ ChefDeprecations/EpicFail:
451
557
 
452
558
  ChefDeprecations/CookbookDependsOnPoise:
453
559
  Description: Cookbooks should not depend on the deprecated Poise framework
560
+ StyleGuide: '#chefdeprecationscookbookdependsonpoise'
454
561
  Enabled: true
455
562
  VersionAdded: '5.1.0'
456
563
  Include:
457
564
  - '**/metadata.rb'
458
565
 
459
566
  ChefDeprecations/CookbookDependsOnCompatResource:
460
- Description: Don't depend on the deprecated compat_resource cookbook made obsolete by Chef 12.19+
567
+ Description: Don't depend on the deprecated compat_resource cookbook made obsolete by Chef Infra Client 12.19+
568
+ StyleGuide: '#chefdeprecationscookbookdependsoncompatresource'
461
569
  Enabled: true
462
570
  VersionAdded: '5.1.0'
463
571
  Include:
464
572
  - '**/metadata.rb'
465
573
 
466
574
  ChefDeprecations/CookbookDependsOnPartialSearch:
467
- Description: Don't depend on the deprecated partial_search cookbook made obsolete by Chef 13+
575
+ Description: Don't depend on the deprecated partial_search cookbook made obsolete by Chef Infra Client 13+
576
+ StyleGuide: '#chefdeprecationscookbookdependsonpartialsearch'
468
577
  Enabled: true
469
578
  VersionAdded: '5.1.0'
470
579
  Include:
471
580
  - '**/metadata.rb'
472
581
 
473
582
  ChefDeprecations/EasyInstallResource:
474
- Description: Don't use the deprecated easy_install resource resource removed in Chef 13
583
+ Description: Don't use the deprecated easy_install resource resource removed in Chef Infra Client 13
584
+ StyleGuide: '#chefdeprecationseasyinstallresource'
475
585
  Enabled: true
476
586
  VersionAdded: '5.1.0'
477
587
  Exclude:
@@ -480,7 +590,8 @@ ChefDeprecations/EasyInstallResource:
480
590
  - '**/Berksfile'
481
591
 
482
592
  ChefDeprecations/ErlCallResource:
483
- Description: Don't use the deprecated erl_call resource removed in Chef 13
593
+ Description: Don't use the deprecated erl_call resource removed in Chef Infra Client 13
594
+ StyleGuide: '#chefdeprecationserlcallresource'
484
595
  Enabled: true
485
596
  VersionAdded: '5.1.0'
486
597
  Exclude:
@@ -490,6 +601,7 @@ ChefDeprecations/ErlCallResource:
490
601
 
491
602
  ChefDeprecations/RequireRecipe:
492
603
  Description: Use include_recipe instead of the require_recipe method
604
+ StyleGuide: '#chefdeprecationsrequirerecipe'
493
605
  Enabled: true
494
606
  VersionAdded: '5.2.0'
495
607
  Exclude:
@@ -499,6 +611,7 @@ ChefDeprecations/RequireRecipe:
499
611
 
500
612
  ChefDeprecations/NodeMethodsInsteadofAttributes:
501
613
  Description: Use node attributes to access Ohai data instead of node methods, which were deprecated in Chef Infra Client 13.
614
+ StyleGuide: '#chefdeprecationsnodemethodsinsteadofattributes'
502
615
  Enabled: true
503
616
  VersionAdded: '5.4.0'
504
617
  Exclude:
@@ -507,6 +620,7 @@ ChefDeprecations/NodeMethodsInsteadofAttributes:
507
620
 
508
621
  ChefDeprecations/UsesDeprecatedMixins:
509
622
  Description: Don't use deprecated Mixins no longer included in Chef Infra Client 14 and later.
623
+ StyleGuide: '#chefdeprecationsusesdeprecatedmixins'
510
624
  Enabled: true
511
625
  VersionAdded: '5.4.0'
512
626
  Include:
@@ -516,6 +630,7 @@ ChefDeprecations/UsesDeprecatedMixins:
516
630
 
517
631
  ChefDeprecations/IncludingXMLRubyRecipe:
518
632
  Description: The xml::ruby recipe installs nokogiri which is included in Chef Infra Client 12 and later.
633
+ StyleGuide: '#chefdeprecationsincludingxmlrubyrecipe'
519
634
  Enabled: true
520
635
  VersionAdded: '5.4.0'
521
636
  Exclude:
@@ -525,6 +640,7 @@ ChefDeprecations/IncludingXMLRubyRecipe:
525
640
 
526
641
  ChefDeprecations/LegacyYumCookbookRecipes:
527
642
  Description: The elrepo, epel, ius, remi, and repoforge recipes were split into their own cookbooks and the yum recipe was renamed to be default with the release of yum cookbook 3.0 (Dec 2013).
643
+ StyleGuide: '#chefdeprecationslegacyyumcookbookrecipes'
528
644
  Enabled: true
529
645
  VersionAdded: '5.4.0'
530
646
  Exclude:
@@ -532,6 +648,7 @@ ChefDeprecations/LegacyYumCookbookRecipes:
532
648
 
533
649
  ChefDeprecations/UsesChefRESTHelpers:
534
650
  Description: Don't use the helpers in Chef::REST which were removed in Chef Infra Client 13
651
+ StyleGuide: '#chefdeprecationsuseschefresthelpers'
535
652
  Enabled: true
536
653
  VersionAdded: '5.5.0'
537
654
  Exclude:
@@ -539,6 +656,7 @@ ChefDeprecations/UsesChefRESTHelpers:
539
656
 
540
657
  ChefDeprecations/ChocolateyPackageUninstallAction:
541
658
  Description: Use the :remove action in the chocolatey_package resource instead of :uninstall which was removed in Chef Infra Client 14+
659
+ StyleGuide: '#chefdeprecationschocolateypackageuninstallaction'
542
660
  Enabled: true
543
661
  VersionAdded: '5.5.0'
544
662
  Exclude:
@@ -546,6 +664,7 @@ ChefDeprecations/ChocolateyPackageUninstallAction:
546
664
 
547
665
  ChefDeprecations/LaunchdDeprecatedHashProperty:
548
666
  Description: The launchd resource's hash property was renamed to plist_hash in Chef Infra Client 13+ to avoid conflicts with Ruby's hash class.
667
+ StyleGuide: '#chefdeprecationslaunchddeprecatedhashproperty'
549
668
  Enabled: true
550
669
  VersionAdded: '5.5.0'
551
670
  Exclude:
@@ -553,6 +672,7 @@ ChefDeprecations/LaunchdDeprecatedHashProperty:
553
672
 
554
673
  ChefDeprecations/LocaleDeprecatedLcAllProperty:
555
674
  Description: The local resource's lc_all property has been deprecated and will be removed in Chef Infra Client 16
675
+ StyleGuide: '#chefdeprecationslocaledeprecatedlcallproperty'
556
676
  Enabled: true
557
677
  VersionAdded: '5.5.0'
558
678
  Exclude:
@@ -560,6 +680,7 @@ ChefDeprecations/LocaleDeprecatedLcAllProperty:
560
680
 
561
681
  ChefDeprecations/UserDeprecatedSupportsProperty:
562
682
  Description: The supports property was removed in Chef Infra Client 13 in favor of individual 'manage_home' and 'non_unique' properties.
683
+ StyleGuide: '#chefdeprecationsuserdeprecatedsupportsproperty'
563
684
  Enabled: true
564
685
  VersionAdded: '5.5.0'
565
686
  Exclude:
@@ -567,6 +688,7 @@ ChefDeprecations/UserDeprecatedSupportsProperty:
567
688
 
568
689
  ChefDeprecations/UseInlineResourcesDefined:
569
690
  Description: use_inline_resources is now the default for resources in Chef Infra Client 13+ and does not need to be specified.
691
+ StyleGuide: '#chefdeprecationsuseinlineresourcesdefined'
570
692
  Enabled: true
571
693
  VersionAdded: '5.4.0'
572
694
  Include:
@@ -576,6 +698,7 @@ ChefDeprecations/UseInlineResourcesDefined:
576
698
 
577
699
  ChefDeprecations/IncludingYumDNFCompatRecipe:
578
700
  Description: Do not include the yum::dnf_yum_compat default recipe to install yum on dnf systems. Chef Infra Client now includes built in support for DNF.
701
+ StyleGuide: '#chefdeprecationsincludingyumdnfcompatrecipe'
579
702
  Enabled: true
580
703
  VersionAdded: '5.3.0'
581
704
  Exclude:
@@ -583,6 +706,7 @@ ChefDeprecations/IncludingYumDNFCompatRecipe:
583
706
 
584
707
  ChefDeprecations/WindowsTaskChangeAction:
585
708
  Description: The :change action in the windows_task resource was removed when windows_task was added to Chef Infra Client 13+. The default action of :create should can now be used to create an update tasks.
709
+ StyleGuide: '#chefdeprecationswindowstaskchangeaction'
586
710
  Enabled: true
587
711
  VersionAdded: '5.6.0'
588
712
  Exclude:
@@ -590,6 +714,7 @@ ChefDeprecations/WindowsTaskChangeAction:
590
714
 
591
715
  ChefDeprecations/ResourceOverridesProvidesMethod:
592
716
  Description: Don't override the provides? method in a resource provider. Use provides :SOME_PROVIDER_NAME instead. This will cause failures in Chef Infra Client 13 and later.
717
+ StyleGuide: '#chefdeprecationsresourceoverridesprovidesmethod'
593
718
  Enabled: true
594
719
  VersionAdded: '5.7.0'
595
720
  Include:
@@ -599,6 +724,7 @@ ChefDeprecations/ResourceOverridesProvidesMethod:
599
724
 
600
725
  ChefDeprecations/ResourceUsesDslNameMethod:
601
726
  Description: Use resource_name instead of the dsl_name method in resources. This will cause failures in Chef Infra Client 13 and later.
727
+ StyleGuide: '#chefdeprecationsresourceusesdslnamemethod'
602
728
  Enabled: true
603
729
  VersionAdded: '5.7.0'
604
730
  Include:
@@ -608,6 +734,7 @@ ChefDeprecations/ResourceUsesDslNameMethod:
608
734
 
609
735
  ChefDeprecations/ResourceUsesUpdatedMethod:
610
736
  Description: Don't use updated = true/false to update resource state. This will cause failures in Chef Infra Client 13 and later.
737
+ StyleGuide: '#chefdeprecationsresourceusesupdatedmethod'
611
738
  Enabled: false # has a high potential for false positives
612
739
  VersionAdded: '5.7.0'
613
740
  Include:
@@ -617,6 +744,7 @@ ChefDeprecations/ResourceUsesUpdatedMethod:
617
744
 
618
745
  ChefDeprecations/NamePropertyWithDefaultValue:
619
746
  Description: A resource property can't be marked as a name_property and also have a default value. This will fail in Chef Infra Client 13 or later.
747
+ StyleGuide: '#chefdeprecationsnamepropertywithdefaultvalue'
620
748
  Enabled: true
621
749
  VersionAdded: '5.7.0'
622
750
  Include:
@@ -625,6 +753,7 @@ ChefDeprecations/NamePropertyWithDefaultValue:
625
753
 
626
754
  ChefDeprecations/ResourceUsesProviderBaseMethod:
627
755
  Description: Don't use the deprecated provider_base method in a resource to specify the provider module to use. Instead, the provider should call provides to register itself, or the resource should call provider to specify the provider to use. This will cause failures in Chef Infra Client 13 and later.
756
+ StyleGuide: '#chefdeprecationsresourceusesproviderbasemethod'
628
757
  Enabled: true
629
758
  VersionAdded: '5.7.0'
630
759
  Include:
@@ -633,6 +762,7 @@ ChefDeprecations/ResourceUsesProviderBaseMethod:
633
762
 
634
763
  ChefDeprecations/ChefSpecCoverageReport:
635
764
  Description: Don't use the deprecated ChefSpec coverage report functionality in your specs.
765
+ StyleGuide: '#chefdeprecationschefspeccoveragereport'
636
766
  Enabled: true
637
767
  VersionAdded: '5.8.0'
638
768
  Include:
@@ -640,6 +770,7 @@ ChefDeprecations/ChefSpecCoverageReport:
640
770
 
641
771
  ChefDeprecations/ChefSpecLegacyRunner:
642
772
  Description: Use ChefSpec::SoloRunner or ChefSpec::ServerRunner instead of the deprecated ChefSpec::Runner.
773
+ StyleGuide: '#chefdeprecationschefspeclegacyrunner'
643
774
  Enabled: true
644
775
  VersionAdded: '5.8.0'
645
776
  Include:
@@ -647,6 +778,7 @@ ChefDeprecations/ChefSpecLegacyRunner:
647
778
 
648
779
  ChefDeprecations/UsesRunCommandHelper:
649
780
  Description: Use 'shell_out!' instead of the legacy 'run_command' helper for shelling out. The run_command helper was removed in Chef Infra Client 13.
781
+ StyleGuide: '#chefdeprecationsusesruncommandhelper'
650
782
  Enabled: true
651
783
  VersionAdded: '5.9.0'
652
784
  Exclude:
@@ -655,6 +787,7 @@ ChefDeprecations/UsesRunCommandHelper:
655
787
 
656
788
  ChefDeprecations/ChefHandlerUsesSupports:
657
789
  Description: Use the type property instead of the deprecated supports property in the chef_handler resource. The supports property was removed in chef_handler cookbook version 3.0 (June 2017) and Chef Infra Client 14.0.
790
+ StyleGuide: '#chefdeprecationschefhandlerusessupports'
658
791
  Enabled: true
659
792
  VersionAdded: '5.9.0'
660
793
  Exclude:
@@ -662,6 +795,7 @@ ChefDeprecations/ChefHandlerUsesSupports:
662
795
 
663
796
  ChefDeprecations/DeprecatedYumRepositoryProperties:
664
797
  Description: With the release of Chef Infra Client 12.14 and the yum cookbook 3.0 several properties in the yum_repository resource were renamed. url -> baseurl, keyurl -> gpgkey, and mirrorexpire -> mirror_expire.
798
+ StyleGuide: '#chefdeprecationsdeprecatedyumrepositoryproperties'
665
799
  Enabled: true
666
800
  VersionAdded: '5.10.0'
667
801
  Exclude:
@@ -669,6 +803,7 @@ ChefDeprecations/DeprecatedYumRepositoryProperties:
669
803
 
670
804
  ChefDeprecations/EOLAuditModeUsage:
671
805
  Description: The beta Audit Mode feature in Chef Infra Client was removed in Chef Infra Client 15.0. Users should instead use InSpec and the audit cookbook. See https://www.inspec.io/ for more informmation.
806
+ StyleGuide: '#chefdeprecationseolauditmodeusage'
672
807
  Enabled: true
673
808
  VersionAdded: '5.10.0'
674
809
  Exclude:
@@ -676,6 +811,7 @@ ChefDeprecations/EOLAuditModeUsage:
676
811
 
677
812
  ChefDeprecations/ResourceInheritsFromCompatResource:
678
813
  Description: HWRP style resource should inherit from the 'Chef::Resource' class and not the 'ChefCompat::Resource' class from the deprecated compat_resource cookbook.
814
+ StyleGuide: '#chefdeprecationsresourceinheritsfromcompatresource'
679
815
  Enabled: true
680
816
  VersionAdded: '5.10.0'
681
817
  Include:
@@ -683,6 +819,7 @@ ChefDeprecations/ResourceInheritsFromCompatResource:
683
819
 
684
820
  ChefDeprecations/VerifyPropertyUsesFileExpansion:
685
821
  Description: Use the 'path' variable in the verify property and not the 'file' variable which was removed in Chef Infra Client 13.
822
+ StyleGuide: '#chefdeprecationsverifypropertyusesfileexpansion'
686
823
  Enabled: true
687
824
  VersionAdded: '5.10.0'
688
825
  Exclude:
@@ -690,11 +827,13 @@ ChefDeprecations/VerifyPropertyUsesFileExpansion:
690
827
 
691
828
  ChefDeprecations/PoiseArchiveUsage:
692
829
  Description: The poise_archive resource in the deprecated poise-archive should be replaced with the archive_file resource found in Chef Infra Client 15+.
830
+ StyleGuide: '#chefdeprecationspoisearchiveusage'
693
831
  Enabled: true
694
832
  VersionAdded: '5.11.0'
695
833
 
696
834
  ChefDeprecations/PartialSearchHelperUsage:
697
835
  Description: Legacy partial_search usage should be updated to use :filter_result in the search helper instead.
836
+ StyleGuide: '#chefdeprecationspartialsearchhelperusage'
698
837
  Enabled: true
699
838
  VersionAdded: '5.11.0'
700
839
  Exclude:
@@ -702,6 +841,7 @@ ChefDeprecations/PartialSearchHelperUsage:
702
841
 
703
842
  ChefDeprecations/SearchUsesPositionalParameters:
704
843
  Description: Don't use deprecated positional parameters in cookbook search queries.
844
+ StyleGuide: '#chefdeprecationssearchusespositionalparameters'
705
845
  Enabled: true
706
846
  VersionAdded: '5.11.0'
707
847
  Exclude:
@@ -709,6 +849,7 @@ ChefDeprecations/SearchUsesPositionalParameters:
709
849
 
710
850
  ChefDeprecations/PartialSearchClassUsage:
711
851
  Description: Legacy Chef::PartialSearch class usage should be updated to use the search helper instead with the filter_result key.
852
+ StyleGuide: '#chefdeprecationspartialsearchclassusage'
712
853
  Enabled: true
713
854
  VersionAdded: '5.11.0'
714
855
  Exclude:
@@ -716,6 +857,7 @@ ChefDeprecations/PartialSearchClassUsage:
716
857
 
717
858
  ChefDeprecations/Cheffile:
718
859
  Description: The Libarian-Chef depsolving project is no longer maintained and should not be used for cookbook depsolving. Consider using Policyfiles instead.
860
+ StyleGuide: '#chefdeprecationscheffile'
719
861
  Enabled: true
720
862
  VersionAdded: '5.12.0'
721
863
  Include:
@@ -723,6 +865,7 @@ ChefDeprecations/Cheffile:
723
865
 
724
866
  ChefDeprecations/LegacyNotifySyntax:
725
867
  Description: Use the new-style notification syntax which allows you to notify resources defined later in a recipe or resource.
868
+ StyleGuide: '#chefdeprecationslegacynotifysyntax'
726
869
  Enabled: true
727
870
  VersionAdded: '5.13.0'
728
871
  Exclude:
@@ -730,6 +873,7 @@ ChefDeprecations/LegacyNotifySyntax:
730
873
 
731
874
  ChefDeprecations/NodeSetWithoutLevel:
732
875
  Description: When setting a node attribute in Chef Infra Client 11 and later you must specify the precedence level.
876
+ StyleGuide: '#chefdeprecationsnodesetwithoutlevel'
733
877
  Enabled: true
734
878
  VersionAdded: '5.13.0'
735
879
  Exclude:
@@ -738,6 +882,7 @@ ChefDeprecations/NodeSetWithoutLevel:
738
882
 
739
883
  ChefDeprecations/ChefRewind:
740
884
  Description: Use delete_resource / edit_resource instead of functionality in the deprecated chef-rewind gem
885
+ StyleGuide: '#chefdeprecationschefrewind'
741
886
  Enabled: true
742
887
  VersionAdded: '5.14.0'
743
888
  Exclude:
@@ -746,6 +891,7 @@ ChefDeprecations/ChefRewind:
746
891
 
747
892
  ChefDeprecations/RubyBlockCreateAction:
748
893
  Description: Use the :run action in the ruby_block resource instead of the deprecated :create action
894
+ StyleGuide: '#chefdeprecationsrubyblockcreateaction'
749
895
  Enabled: true
750
896
  VersionAdded: '5.16.0'
751
897
  Exclude:
@@ -755,6 +901,7 @@ ChefDeprecations/RubyBlockCreateAction:
755
901
 
756
902
  ChefDeprecations/DeprecatedPlatformMethods:
757
903
  Description: Use provider_for_action instead of the deprecated Chef::Platform methods in resources.
904
+ StyleGuide: '#chefdeprecationsdeprecatedplatformmethods'
758
905
  Enabled: true
759
906
  VersionAdded: '5.16.0'
760
907
  Include:
@@ -764,6 +911,7 @@ ChefDeprecations/DeprecatedPlatformMethods:
764
911
 
765
912
  ChefDeprecations/DeprecatedChefSpecPlatform:
766
913
  Description: Use currently supported platforms in ChefSpec listed at https://github.com/chefspec/fauxhai/blob/master/PLATFORMS.md. Fauxhai / ChefSpec will perform fuzzy matching on platform version so it's always best to be less specific ie. 10 instead of 10.3
914
+ StyleGuide: '#chefdeprecationsdeprecatedchefspecplatform'
767
915
  Enabled: true
768
916
  VersionAdded: '5.20.0'
769
917
  Include:
@@ -771,6 +919,7 @@ ChefDeprecations/DeprecatedChefSpecPlatform:
771
919
 
772
920
  ChefDeprecations/WindowsFeatureServermanagercmd:
773
921
  Description: The `windows_feature` resource no longer supports setting the `install_method` to `:servermanagercmd`. `:windows_feature_dism` or `:windows_feature_powershell` should be used instead.
922
+ StyleGuide: '#chefdeprecationswindowsfeatureservermanagercmd'
774
923
  Enabled: true
775
924
  VersionAdded: '5.22.0'
776
925
  Exclude:
@@ -780,6 +929,7 @@ ChefDeprecations/WindowsFeatureServermanagercmd:
780
929
 
781
930
  ChefDeprecations/DeprecatedWindowsVersionCheck:
782
931
  Description: Don't use the deprecated older_than_win_2012_or_8? helper. Windows versions before 2012 and 8 are now end of life and this helper will always return false.
932
+ StyleGuide: '#chefdeprecationsdeprecatedwindowsversioncheck'
783
933
  Enabled: true
784
934
  VersionAdded: '6.0.0'
785
935
  Exclude:
@@ -788,6 +938,7 @@ ChefDeprecations/DeprecatedWindowsVersionCheck:
788
938
 
789
939
  ChefDeprecations/ChefWindowsPlatformHelper:
790
940
  Description: Use `platform?('windows')` instead of the legacy `Chef::Platform.windows?` helper.
941
+ StyleGuide: '#chefdeprecationschefwindowsplatformhelper'
791
942
  Enabled: true
792
943
  VersionAdded: '6.0.0'
793
944
  Exclude:
@@ -796,21 +947,25 @@ ChefDeprecations/ChefWindowsPlatformHelper:
796
947
 
797
948
  ChefDeprecations/LogResourceNotifications:
798
949
  Description: In Chef Infra Client 16 the log resource no longer notifies when logging so notifications should not be triggered from log resources. Use the notify_group resource instead to aggregate notifications.
950
+ StyleGuide: '#chefdeprecationslogresourcenotifications'
799
951
  Enabled: true
800
952
  VersionAdded: '6.0.0'
801
953
  Exclude:
802
954
  - '**/metadata.rb'
803
955
  - '**/Berksfile'
804
956
 
805
- ChefDeprecations/ResourceWithoutNameOrProvides:
806
- Description: In Chef Infra Client 16 and later legacy HWRP resources must use either `resource_name` or `provides` to define the resource name.
957
+ ChefDeprecations/HWRPWithoutProvides:
958
+ Description: In Chef Infra Client 16 and later a legacy HWRP resource must use `provides` to define how the resource is called in recipes or other resources. To maintain compatibility with Chef Infra Client < 16 use both `resource_name` and `provides`.
959
+ StyleGuide: '#chefdeprecationsresourcewithoutnameorprovides'
807
960
  Enabled: true
808
961
  VersionAdded: '6.0.0'
962
+ VersionChanged: '6.8.0'
809
963
  Include:
810
964
  - '**/libraries/*.rb'
811
965
 
812
966
  ChefDeprecations/WindowsVersionHelpers:
813
967
  Description: Use node['platform_version'] data instead of the Windows::VersionHelper helper from the Windows cookbook.
968
+ StyleGuide: '#chefdeprecationswindowsversionhelpers'
814
969
  Enabled: true
815
970
  VersionAdded: '5.4.0'
816
971
  Exclude:
@@ -819,6 +974,7 @@ ChefDeprecations/WindowsVersionHelpers:
819
974
 
820
975
  ChefDeprecations/PowershellCookbookHelpers:
821
976
  Description: Use node['powershell']['version'] or the new powershell_version helper available in Chef Infra Client 16+ instead of the deprecated PowerShell cookbook helpers.
977
+ StyleGuide: '#chefdeprecationspowershellcookbookhelpers'
822
978
  Enabled: true
823
979
  VersionAdded: '6.1.0'
824
980
  Exclude:
@@ -827,6 +983,7 @@ ChefDeprecations/PowershellCookbookHelpers:
827
983
 
828
984
  ChefDeprecations/DeprecatedShelloutMethods:
829
985
  Description: Many legacy specialized shell_out methods were replaced in Chef Infra Client 14.3 and removed in Chef Infra Client 15. Use shell_out and any additional options if necessary.
986
+ StyleGuide: '#chefdeprecationsdeprecatedshelloutmethods'
830
987
  Enabled: true
831
988
  VersionAdded: '6.3.0'
832
989
  Exclude:
@@ -836,18 +993,32 @@ ChefDeprecations/DeprecatedShelloutMethods:
836
993
 
837
994
  ChefDeprecations/Ruby27KeywordArgumentWarnings:
838
995
  Description: Pass options to shell_out helpers without the brackets to avoid Ruby 2.7 deprecation warnings.
996
+ StyleGuide: '#chefdeprecationsruby27keywordargumentwarnings'
839
997
  Enabled: true
840
998
  VersionAdded: '6.5.0'
841
999
  Exclude:
842
1000
  - '**/metadata.rb'
843
1001
  - '**/Berksfile'
844
1002
 
1003
+ ChefDeprecations/ResourceUsesOnlyResourceName:
1004
+ Description: Starting with Chef Infra Client 16, using `resource_name` without also using `provides` will result in resource failures. Use `provides` to change the name of the resource instead and omit `resource_name` entirely if it matches the name Chef Infra Client automatically assigns based on COOKBOOKNAME_FILENAME.
1005
+ StyleGuide: '#chefdeprecationsresourceusesonlyresourcename'
1006
+ Enabled: true
1007
+ VersionAdded: '6.7.0'
1008
+ Include:
1009
+ - '**/libraries/*.rb'
1010
+ - '**/resources/*.rb'
1011
+
845
1012
  ###############################
846
1013
  # ChefModernize: Cleaning up legacy code and using new built-in resources
847
1014
  ###############################
848
1015
 
1016
+ ChefModernize:
1017
+ StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefmodernize.md
1018
+
849
1019
  ChefModernize/LegacyBerksfileSource:
850
1020
  Description: Do not use legacy Berksfile community sources. Use Chef Supermarket instead.
1021
+ StyleGuide: '#chefmodernizelegacyberksfilesource'
851
1022
  Enabled: true
852
1023
  VersionAdded: '5.1.0'
853
1024
  Include:
@@ -855,6 +1026,7 @@ ChefModernize/LegacyBerksfileSource:
855
1026
 
856
1027
  ChefModernize/WhyRunSupportedTrue:
857
1028
  Description: whyrun_supported? no longer needs to be set to true as it is the default in Chef 13+
1029
+ StyleGuide: '#chefmodernizewhyrunsupportedtrue'
858
1030
  Enabled: true
859
1031
  VersionAdded: '5.1.0'
860
1032
  Include:
@@ -864,13 +1036,15 @@ ChefModernize/WhyRunSupportedTrue:
864
1036
 
865
1037
  ChefModernize/UnnecessaryDependsChef14:
866
1038
  Description: Don't depend on cookbooks made obsolete by Chef Infra Client 14+. These community cookbooks contain resources that are now included in Chef Infra Client itself.
1039
+ StyleGuide: '#chefmodernizeunnecessarydependschef14'
867
1040
  Enabled: true
868
1041
  VersionAdded: '5.1.0'
869
1042
  Include:
870
1043
  - '**/metadata.rb'
871
1044
 
872
1045
  ChefModernize/RespondToInMetadata:
873
- Description: It is no longer necessary to use respond_to? in metadata.rb in Chef 12.15 and later
1046
+ Description: It is no longer necessary to use respond_to? in metadata.rb in Chef Infra Client 12.15 and later
1047
+ StyleGuide: '#chefmodernizerespondtoinmetadata'
874
1048
  Enabled: true
875
1049
  VersionAdded: '5.2.0'
876
1050
  Include:
@@ -878,6 +1052,7 @@ ChefModernize/RespondToInMetadata:
878
1052
 
879
1053
  ChefModernize/RespondToResourceName:
880
1054
  Description: respond_to?(:resource_name) in resources is no longer necessary in Chef Infra Client 12.5+
1055
+ StyleGuide: '#chefmodernizerespondtoresourcename'
881
1056
  Enabled: true
882
1057
  VersionAdded: '5.2.0'
883
1058
  Include:
@@ -886,6 +1061,7 @@ ChefModernize/RespondToResourceName:
886
1061
 
887
1062
  ChefModernize/RespondToProvides:
888
1063
  Description: respond_to?(:provides) in resources is no longer necessary in Chef Infra Client 12+
1064
+ StyleGuide: '#chefmodernizerespondtoprovides'
889
1065
  Enabled: true
890
1066
  VersionAdded: '5.2.0'
891
1067
  Include:
@@ -894,6 +1070,7 @@ ChefModernize/RespondToProvides:
894
1070
 
895
1071
  ChefModernize/SetOrReturnInResources:
896
1072
  Description: Do not use set_or_return within a method to define a property for a resource. Use the property method instead, which supports validation, reporting, and documentation functionality.
1073
+ StyleGuide: '#chefmodernizesetorreturninresources'
897
1074
  Enabled: true
898
1075
  VersionAdded: '5.2.0'
899
1076
  Include:
@@ -902,6 +1079,7 @@ ChefModernize/SetOrReturnInResources:
902
1079
 
903
1080
  ChefModernize/CustomResourceWithAttributes:
904
1081
  Description: Custom Resources should contain properties not attributes.
1082
+ StyleGuide: '#chefmodernizecustomresourcewithattributes'
905
1083
  Enabled: true
906
1084
  VersionAdded: '5.2.0'
907
1085
  Include:
@@ -909,6 +1087,7 @@ ChefModernize/CustomResourceWithAttributes:
909
1087
 
910
1088
  ChefModernize/IncludingAptDefaultRecipe:
911
1089
  Description: Do not include the Apt default recipe to update package cache. Instead use the apt_update resource, which is built into Chef Infra Client 12.7 and later.
1090
+ StyleGuide: '#chefmodernizeincludingaptdefaultrecipe'
912
1091
  Enabled: true
913
1092
  VersionAdded: '5.3.0'
914
1093
  Exclude:
@@ -916,6 +1095,7 @@ ChefModernize/IncludingAptDefaultRecipe:
916
1095
 
917
1096
  ChefModernize/IncludingWindowsDefaultRecipe:
918
1097
  Description: Do not include the Windows default recipe, which only installs win32 gems already included in Chef Infra Client
1098
+ StyleGuide: '#chefmodernizeincludingwindowsdefaultrecipe'
919
1099
  Enabled: true
920
1100
  VersionAdded: '5.3.0'
921
1101
  Exclude:
@@ -923,6 +1103,7 @@ ChefModernize/IncludingWindowsDefaultRecipe:
923
1103
 
924
1104
  ChefModernize/DefinesChefSpecMatchers:
925
1105
  Description: ChefSpec matchers are now auto generated by ChefSpec 7.1+ and do not need to be defined in a cookbook
1106
+ StyleGuide: '#chefmodernizedefineschefspecmatchers'
926
1107
  Enabled: true
927
1108
  VersionAdded: '5.3.0'
928
1109
  Include:
@@ -930,6 +1111,7 @@ ChefModernize/DefinesChefSpecMatchers:
930
1111
 
931
1112
  ChefModernize/ExecuteAptUpdate:
932
1113
  Description: Use the apt_update resource instead of the execute resource to run an apt-get update package cache update
1114
+ StyleGuide: '#chefmodernizeexecuteaptupdate'
933
1115
  Enabled: true
934
1116
  VersionAdded: '5.3.0'
935
1117
  Exclude:
@@ -937,6 +1119,7 @@ ChefModernize/ExecuteAptUpdate:
937
1119
 
938
1120
  ChefModernize/MinitestHandlerUsage:
939
1121
  Description: Use Chef InSpec for testing instead of the Minitest Handler cookbook pattern.
1122
+ StyleGuide: '#chefmodernizeminitesthandlerusage'
940
1123
  Enabled: true
941
1124
  VersionAdded: '5.4.0'
942
1125
  Include:
@@ -944,14 +1127,17 @@ ChefModernize/MinitestHandlerUsage:
944
1127
 
945
1128
  ChefModernize/IncludingMixinShelloutInResources:
946
1129
  Description: There is no need to include Chef::Mixin::ShellOut or Chef::Mixin::PowershellOut in resources or providers as this is already done by Chef Infra Client 12.4+.
1130
+ StyleGuide: '#chefmodernizeincludingmixinshelloutinresources'
947
1131
  Enabled: true
948
1132
  VersionAdded: '5.4.0'
949
1133
  Include:
950
1134
  - '**/resources/*.rb'
951
1135
  - '**/providers/*.rb'
1136
+ - '**/libraries/*.rb'
952
1137
 
953
1138
  ChefModernize/UseBuildEssentialResource:
954
1139
  Description: Use the build_essential resource instead of the legacy build-essential recipe. This resource ships in the build-essential cookbook v5.0+ and is built into Chef Infra Client 14+
1140
+ StyleGuide: '#chefmodernizeusebuildessentialresource'
955
1141
  Enabled: true
956
1142
  VersionAdded: '5.1.0'
957
1143
  Exclude:
@@ -959,6 +1145,7 @@ ChefModernize/UseBuildEssentialResource:
959
1145
 
960
1146
  ChefModernize/WindowsZipfileUsage:
961
1147
  Description: Use the archive_file resource built into Chef Infra Client 15+ instead of the windows_zipfile from the Windows cookbook
1148
+ StyleGuide: '#chefmodernizewindowszipfileusage'
962
1149
  Enabled: true
963
1150
  VersionAdded: '5.4.0'
964
1151
  Exclude:
@@ -966,6 +1153,7 @@ ChefModernize/WindowsZipfileUsage:
966
1153
 
967
1154
  ChefModernize/SevenZipArchiveResource:
968
1155
  Description: Use the archive_file resource built into Chef Infra Client 15+ instead of the seven_zip_archive
1156
+ StyleGuide: '#chefmodernizesevenziparchiveresource'
969
1157
  Enabled: true
970
1158
  VersionAdded: '5.5.0'
971
1159
  Exclude:
@@ -973,6 +1161,7 @@ ChefModernize/SevenZipArchiveResource:
973
1161
 
974
1162
  ChefModernize/LibarchiveFileResource:
975
1163
  Description: Use the archive_file resource built into Chef Infra Client 15+ instead of the libarchive file resource
1164
+ StyleGuide: '#chefmodernizelibarchivefileresource'
976
1165
  Enabled: true
977
1166
  VersionAdded: '5.5.0'
978
1167
  Exclude:
@@ -980,6 +1169,7 @@ ChefModernize/LibarchiveFileResource:
980
1169
 
981
1170
  ChefModernize/PowershellScriptExpandArchive:
982
1171
  Description: Use the archive_file resource built into Chef Infra Client 15+ instead of using Expand-Archive in a powershell_script resource
1172
+ StyleGuide: '#chefmodernizepowershellscriptexpandarchive'
983
1173
  Enabled: true
984
1174
  VersionAdded: '5.5.0'
985
1175
  Exclude:
@@ -987,6 +1177,7 @@ ChefModernize/PowershellScriptExpandArchive:
987
1177
 
988
1178
  ChefModernize/PowershellInstallPackage:
989
1179
  Description: Use the package resource built into Chef Infra Client instead of using Install-Package in a powershell_script resource
1180
+ StyleGuide: '#chefmodernizepowershellinstallpackage'
990
1181
  Enabled: true
991
1182
  VersionAdded: '5.5.0'
992
1183
  Exclude:
@@ -994,6 +1185,7 @@ ChefModernize/PowershellInstallPackage:
994
1185
 
995
1186
  ChefModernize/PowershellInstallWindowsFeature:
996
1187
  Description: Use the windows_feature resource built into Chef Infra Client 13+ instead of using Install-WindowsFeature or Add-WindowsFeature in a powershell_script resource
1188
+ StyleGuide: '#chefmodernizepowershellinstallwindowsfeature'
997
1189
  Enabled: true
998
1190
  VersionAdded: '5.5.0'
999
1191
  Exclude:
@@ -1001,6 +1193,7 @@ ChefModernize/PowershellInstallWindowsFeature:
1001
1193
 
1002
1194
  ChefModernize/ShellOutToChocolatey:
1003
1195
  Description: Use the Chocolatey resources built into Chef Infra Client instead of shelling out to the choco command
1196
+ StyleGuide: '#chefmodernizeshellouttochocolatey'
1004
1197
  Enabled: true
1005
1198
  VersionAdded: '5.5.0'
1006
1199
  Exclude:
@@ -1008,6 +1201,7 @@ ChefModernize/ShellOutToChocolatey:
1008
1201
 
1009
1202
  ChefModernize/CronManageResource:
1010
1203
  Description: The cron_manage resource was renamed to cron_access in the 6.1 release of the cron cookbook and later shipped in Chef Infra Client 14.4. The new resource name should be used.
1204
+ StyleGuide: '#chefmodernizecronmanageresource'
1011
1205
  Enabled: true
1012
1206
  VersionAdded: '5.6.0'
1013
1207
  Exclude:
@@ -1015,6 +1209,7 @@ ChefModernize/CronManageResource:
1015
1209
 
1016
1210
  ChefModernize/UsesZypperRepo:
1017
1211
  Description: The zypper_repo resource was renamed zypper_repository when it was added to Chef Infra Client 13.3.
1212
+ StyleGuide: '#chefmodernizeuseszypperrepo'
1018
1213
  Enabled: true
1019
1214
  VersionAdded: '5.6.0'
1020
1215
  Exclude:
@@ -1022,6 +1217,7 @@ ChefModernize/UsesZypperRepo:
1022
1217
 
1023
1218
  ChefModernize/DependsOnZypperCookbook:
1024
1219
  Description: Don't include the zypper cookbook as the zypper_repository resource is built into Chef Infra Client 13.3+
1220
+ StyleGuide: '#chefmodernizedependsonzyppercookbook'
1025
1221
  Enabled: true
1026
1222
  VersionAdded: '5.6.0'
1027
1223
  Exclude:
@@ -1029,6 +1225,7 @@ ChefModernize/DependsOnZypperCookbook:
1029
1225
 
1030
1226
  ChefModernize/ExecuteTzUtil:
1031
1227
  Description: Use the timezone resource included in Chef Infra Client 14.6+ instead of shelling out to tzutil
1228
+ StyleGuide: '#chefmodernizeexecutetzutil'
1032
1229
  Enabled: true
1033
1230
  VersionAdded: '5.6.0'
1034
1231
  Exclude:
@@ -1036,6 +1233,7 @@ ChefModernize/ExecuteTzUtil:
1036
1233
 
1037
1234
  ChefModernize/OpensslRsaKeyResource:
1038
1235
  Description: The openssl_rsa_key resource was renamed to openssl_rsa_private_key in Chef Infra Client 14.0. The new resource name should be used.
1236
+ StyleGuide: '#chefmodernizeopensslrsakeyresource'
1039
1237
  Enabled: true
1040
1238
  VersionAdded: '5.6.0'
1041
1239
  Exclude:
@@ -1043,6 +1241,7 @@ ChefModernize/OpensslRsaKeyResource:
1043
1241
 
1044
1242
  ChefModernize/OpensslX509Resource:
1045
1243
  Description: The openssl_x509 resource was renamed to openssl_x509_certificate in Chef Infra Client 14.4. The new resource name should be used.
1244
+ StyleGuide: '#chefmodernizeopensslx509resource'
1046
1245
  Enabled: true
1047
1246
  VersionAdded: '5.6.0'
1048
1247
  Exclude:
@@ -1050,6 +1249,7 @@ ChefModernize/OpensslX509Resource:
1050
1249
 
1051
1250
  ChefModernize/OsxConfigProfileResource:
1052
1251
  Description: The osx_config_profile resource was renamed to osx_profile. The new resource name should be used.
1252
+ StyleGuide: '#chefmodernizeosxconfigprofileresource'
1053
1253
  Enabled: true
1054
1254
  VersionAdded: '5.6.0'
1055
1255
  Exclude:
@@ -1057,6 +1257,7 @@ ChefModernize/OsxConfigProfileResource:
1057
1257
 
1058
1258
  ChefModernize/SysctlParamResource:
1059
1259
  Description: The sysctl_param resource was renamed to sysctl when it was added to Chef Infra Client 14.0. The new resource name should be used.
1260
+ StyleGuide: '#chefmodernizesysctlparamresource'
1060
1261
  Enabled: true
1061
1262
  VersionAdded: '5.6.0'
1062
1263
  Exclude:
@@ -1064,6 +1265,7 @@ ChefModernize/SysctlParamResource:
1064
1265
 
1065
1266
  ChefModernize/MacOsXUserdefaults:
1066
1267
  Description: The mac_os_x_userdefaults resource was renamed to macos_userdefaults when it was added to Chef Infra Client 14.0. The new resource name should be used.
1268
+ StyleGuide: '#chefmodernizemacosxuserdefaults'
1067
1269
  Enabled: true
1068
1270
  VersionAdded: '5.6.0'
1069
1271
  Exclude:
@@ -1071,6 +1273,7 @@ ChefModernize/MacOsXUserdefaults:
1071
1273
 
1072
1274
  ChefModernize/PowerShellGuardInterpreter:
1073
1275
  Description: PowerShell is already set as the default guard interpreter for powershell_script resources in Chef Infra Client 13 and later and does not need to be specified.
1276
+ StyleGuide: '#chefmodernizepowershellguardinterpreter'
1074
1277
  Enabled: true
1075
1278
  VersionAdded: '5.9.0'
1076
1279
  Exclude:
@@ -1078,6 +1281,7 @@ ChefModernize/PowerShellGuardInterpreter:
1078
1281
 
1079
1282
  ChefModernize/DefaultActionFromInitialize:
1080
1283
  Description: The default actions can now be specified using the `default_action` helper instead of using the @action variable in the resource provider initialize method.
1284
+ StyleGuide: '#chefmodernizedefaultactionfrominitialize'
1081
1285
  Enabled: true
1082
1286
  VersionAdded: '5.10.0'
1083
1287
  Include:
@@ -1087,6 +1291,7 @@ ChefModernize/DefaultActionFromInitialize:
1087
1291
 
1088
1292
  ChefModernize/ResourceNameFromInitialize:
1089
1293
  Description: The name of a resource can be set with the "resource_name" helper instead of using the initialize method.
1294
+ StyleGuide: '#chefmodernizeresourcenamefrominitialize'
1090
1295
  Enabled: true
1091
1296
  VersionAdded: '5.10.0'
1092
1297
  Include:
@@ -1096,13 +1301,15 @@ ChefModernize/ResourceNameFromInitialize:
1096
1301
 
1097
1302
  ChefModernize/Definitions:
1098
1303
  Description: Legacy Chef Infra definitions should be rewritten as custom resources to take full advantage of the Chef Infra feature set.
1304
+ StyleGuide: '#chefmodernizedefinitions'
1099
1305
  Enabled: true
1100
1306
  VersionAdded: '5.11.0'
1101
1307
  Include:
1102
1308
  - '**/definitions/*.rb'
1103
1309
 
1104
1310
  ChefModernize/IfProvidesDefaultAction:
1105
- Description: if defined?(default_action) is no longer necessary in Chef Resources as default_action shipped in Chef 10.8.
1311
+ Description: if defined?(default_action) is no longer necessary in Chef Infra resources as default_action shipped in Chef Infra Client 10.8.
1312
+ StyleGuide: '#chefmodernizeifprovidesdefaultaction'
1106
1313
  Enabled: true
1107
1314
  VersionAdded: '5.12.0'
1108
1315
  Include:
@@ -1111,11 +1318,13 @@ ChefModernize/IfProvidesDefaultAction:
1111
1318
 
1112
1319
  ChefModernize/ZipfileResource:
1113
1320
  Description: Use the archive_file resource built into Chef Infra Client 15+ instead of the zipfile resource from the zipfile cookbook.
1321
+ StyleGuide: '#chefmodernizezipfileresource'
1114
1322
  Enabled: true
1115
1323
  VersionAdded: '5.12.0'
1116
1324
 
1117
1325
  ChefModernize/UnnecessaryMixlibShelloutRequire:
1118
1326
  Description: Chef Infra Client 12.4 and later include mixlib/shellout automatically in resources and providers.
1327
+ StyleGuide: '#chefmodernizeunnecessarymixlibshelloutrequire'
1119
1328
  Enabled: true
1120
1329
  VersionAdded: '5.12.0'
1121
1330
  Include:
@@ -1124,6 +1333,7 @@ ChefModernize/UnnecessaryMixlibShelloutRequire:
1124
1333
 
1125
1334
  ChefModernize/EmptyResourceInitializeMethod:
1126
1335
  Description: There is no need for an empty initialize method in a resource
1336
+ StyleGuide: '#chefmodernizeemptyresourceinitializemethod'
1127
1337
  Enabled: true
1128
1338
  VersionAdded: '5.13.0'
1129
1339
  Include:
@@ -1132,6 +1342,7 @@ ChefModernize/EmptyResourceInitializeMethod:
1132
1342
 
1133
1343
  ChefModernize/ChefGemNokogiri:
1134
1344
  Description: The nokogiri gem ships in Chef Infra Client 12+ and does not need to be installed before being used.
1345
+ StyleGuide: '#chefmodernizechefgemnokogiri'
1135
1346
  Enabled: true
1136
1347
  VersionAdded: '5.14.0'
1137
1348
  Exclude:
@@ -1140,6 +1351,7 @@ ChefModernize/ChefGemNokogiri:
1140
1351
 
1141
1352
  ChefModernize/PropertyWithNameAttribute:
1142
1353
  Description: Resource property sets name_attribute not name_property
1354
+ StyleGuide: '#chefmodernizepropertywithnameattribute'
1143
1355
  Enabled: true
1144
1356
  VersionAdded: '5.1.0'
1145
1357
  VersionChanged: '5.15.0'
@@ -1149,6 +1361,7 @@ ChefModernize/PropertyWithNameAttribute:
1149
1361
 
1150
1362
  ChefModernize/IncludingOhaiDefaultRecipe:
1151
1363
  Description: Use the ohai_plugin resource to ship custom Ohai plugins instead of using the ohai::default recipe. If you're not shipping custom Ohai plugins, then you can remove this recipe entirely.
1364
+ StyleGuide: '#chefmodernizeincludingohaidefaultrecipe'
1152
1365
  Enabled: true
1153
1366
  VersionAdded: '5.4.0'
1154
1367
  VersionChanged: '5.15.0'
@@ -1158,6 +1371,7 @@ ChefModernize/IncludingOhaiDefaultRecipe:
1158
1371
 
1159
1372
  ChefModernize/AllowedActionsFromInitialize:
1160
1373
  Description: The allowed actions of a resource can be set with the "allowed_actions" helper instead of using the initialize method.
1374
+ StyleGuide: '#chefmodernizeallowedactionsfrominitialize'
1161
1375
  Enabled: true
1162
1376
  VersionAdded: '5.15.0'
1163
1377
  Include:
@@ -1166,6 +1380,7 @@ ChefModernize/AllowedActionsFromInitialize:
1166
1380
 
1167
1381
  ChefModernize/FoodcriticComments:
1168
1382
  Description: Remove legacy code comments that disable Foodcritic rules. These comments are no longer necessary if you've migrated from Foodcritic to Cookstyle for cookbook linting.
1383
+ StyleGuide: '#chefmodernizefoodcriticcomments'
1169
1384
  Enabled: true
1170
1385
  VersionAdded: '5.16.0'
1171
1386
  Exclude:
@@ -1173,6 +1388,7 @@ ChefModernize/FoodcriticComments:
1173
1388
 
1174
1389
  ChefModernize/ExecuteScExe:
1175
1390
  Description: Chef Infra Client 14.0 and later includes :create, :delete, and :configure actions with the full idempotency of the windows_service resource. See the windows_service documentation at https://docs.chef.io/resource_windows_service.html for additional details on creating services with the windows_service resource
1391
+ StyleGuide: '#chefmodernizeexecutescexe'
1176
1392
  Enabled: true
1177
1393
  VersionAdded: '5.16.0'
1178
1394
  Exclude:
@@ -1182,6 +1398,7 @@ ChefModernize/ExecuteScExe:
1182
1398
 
1183
1399
  ChefModernize/WindowsScResource:
1184
1400
  Description: Chef Infra Client 14.0 and later includes :create, :delete, and :configure actions without the need for the sc cookbook dependency. See the windows_service documentation at https://docs.chef.io/resource_windows_service.html for additional details.
1401
+ StyleGuide: '#chefmodernizewindowsscresource'
1185
1402
  Enabled: true
1186
1403
  VersionAdded: '5.16.0'
1187
1404
  Exclude:
@@ -1191,6 +1408,7 @@ ChefModernize/WindowsScResource:
1191
1408
 
1192
1409
  ChefModernize/ExecuteSleep:
1193
1410
  Description: Chef Infra Client 15.5 and later include a chef_sleep resource that should be used to sleep between executing resources if necessary instead of using the bash or execute resources to run the sleep command.
1411
+ StyleGuide: '#chefmodernizeexecutesleep'
1194
1412
  Enabled: true
1195
1413
  VersionAdded: '5.16.0'
1196
1414
  Exclude:
@@ -1200,6 +1418,7 @@ ChefModernize/ExecuteSleep:
1200
1418
 
1201
1419
  ChefModernize/DslIncludeInResource:
1202
1420
  Description: 'There is no need to include Chef::DSL::Recipe or Chef::DSL::IncludeRecipe classes in resources or providers as this is done automatically.'
1421
+ StyleGuide: '#chefmodernizedslincludeinresource'
1203
1422
  Enabled: true
1204
1423
  VersionAdded: '5.17.0'
1205
1424
  Include:
@@ -1208,6 +1427,7 @@ ChefModernize/DslIncludeInResource:
1208
1427
 
1209
1428
  ChefModernize/ResourceForcingCompileTime:
1210
1429
  Description: The hostname, build_essential, chef_gem, and ohai_hint resources include 'compile_time' properties, which should be used to force the resources to run at compile time by setting `compile_time true`.
1430
+ StyleGuide: '#chefmodernizeresourceforcingcompiletime'
1211
1431
  Enabled: true
1212
1432
  VersionAdded: '5.18.0'
1213
1433
  Exclude:
@@ -1217,6 +1437,7 @@ ChefModernize/ResourceForcingCompileTime:
1217
1437
 
1218
1438
  ChefModernize/ExecuteSysctl:
1219
1439
  Description: Chef Infra Client 14.0 and later includes a sysctl resource that should be used to idempotently load sysctl values instead of templating files and using execute to load them.
1440
+ StyleGuide: '#chefmodernizeexecutesysctl'
1220
1441
  Enabled: true
1221
1442
  VersionAdded: '5.18.0'
1222
1443
  Exclude:
@@ -1226,6 +1447,7 @@ ChefModernize/ExecuteSysctl:
1226
1447
 
1227
1448
  ChefModernize/SimplifyAptPpaSetup:
1228
1449
  Description: The apt_repository resource allows setting up PPAs without using the full URL to ppa.launchpad.net.
1450
+ StyleGuide: '#chefmodernizesimplifyaptppasetup'
1229
1451
  Enabled: true
1230
1452
  VersionAdded: '5.21.0'
1231
1453
  Exclude:
@@ -1235,6 +1457,7 @@ ChefModernize/SimplifyAptPpaSetup:
1235
1457
 
1236
1458
  ChefModernize/UseRequireRelative:
1237
1459
  Description: Instead of using require with a File.expand_path and __FILE__ use the simpler require_relative method.
1460
+ StyleGuide: '#chefmodernizeuserequirerelative'
1238
1461
  Enabled: true
1239
1462
  VersionAdded: '5.22.0'
1240
1463
  Exclude:
@@ -1244,6 +1467,7 @@ ChefModernize/UseRequireRelative:
1244
1467
 
1245
1468
  ChefModernize/NodeInitPackage:
1246
1469
  Description: Use node['init_package'] to check for systemd instead of reading the contents of '/proc/1/comm'
1470
+ StyleGuide: '#chefmodernizenodeinitpackage'
1247
1471
  Enabled: true
1248
1472
  VersionAdded: '5.22.0'
1249
1473
  Exclude:
@@ -1252,6 +1476,7 @@ ChefModernize/NodeInitPackage:
1252
1476
 
1253
1477
  ChefModernize/WindowsRegistryUAC:
1254
1478
  Description: Chef Infra Client 15.0 and later includes a windows_uac resource that should be used to set Windows UAC values instead of setting registry keys directly.
1479
+ StyleGuide: '#chefmodernizewindowsregistryuac'
1255
1480
  Enabled: true
1256
1481
  VersionAdded: '5.22.0'
1257
1482
  Exclude:
@@ -1261,6 +1486,7 @@ ChefModernize/WindowsRegistryUAC:
1261
1486
 
1262
1487
  ChefModernize/UseMultipackageInstalls:
1263
1488
  Description: Pass an array of packages to package resources instead of interating over an array of packages when using multi-package capable package subystem such as apt, yum, chocolatey, dnf, or zypper. Multipackage installs are faster and simplify logs.
1489
+ StyleGuide: '#chefmodernizeusemultipackageinstalls'
1264
1490
  Enabled: true
1265
1491
  VersionAdded: '6.0.0'
1266
1492
  Exclude:
@@ -1270,6 +1496,7 @@ ChefModernize/UseMultipackageInstalls:
1270
1496
 
1271
1497
  ChefModernize/ProvidesFromInitialize:
1272
1498
  Description: Provides should be set using the `provides` resource DSL method instead of instead of setting @provides in the initialize method.
1499
+ StyleGuide: '#chefmodernizeprovidesfrominitialize'
1273
1500
  Enabled: true
1274
1501
  VersionAdded: '6.0.0'
1275
1502
  Include:
@@ -1279,6 +1506,7 @@ ChefModernize/ProvidesFromInitialize:
1279
1506
 
1280
1507
  ChefModernize/DatabagHelpers:
1281
1508
  Description: Use the `data_bag_item` helper instead of `Chef::DataBagItem.load` or `Chef::EncryptedDataBagItem.load`.
1509
+ StyleGuide: '#chefmodernizedatabaghelpers'
1282
1510
  Enabled: true
1283
1511
  VersionAdded: '6.0.0'
1284
1512
  Exclude:
@@ -1287,6 +1515,7 @@ ChefModernize/DatabagHelpers:
1287
1515
 
1288
1516
  ChefModernize/NodeRolesInclude:
1289
1517
  Description: Use `node.role?('foo')` to check if a node includes a role instead of `node['roles'].include?('foo')`.
1518
+ StyleGuide: '#chefmodernizenoderolesinclude'
1290
1519
  Enabled: true
1291
1520
  VersionAdded: '6.1.0'
1292
1521
  Exclude:
@@ -1295,6 +1524,7 @@ ChefModernize/NodeRolesInclude:
1295
1524
 
1296
1525
  ChefModernize/RespondToCompileTime:
1297
1526
  Description: There is no need to check if the chef_gem resource supports compile_time as Chef Infra Client 12.1 and later support the compile_time property.
1527
+ StyleGuide: '#chefmodernizeresondtocompiletime'
1298
1528
  Enabled: true
1299
1529
  VersionAdded: '6.3.0'
1300
1530
  Exclude:
@@ -1303,6 +1533,7 @@ ChefModernize/RespondToCompileTime:
1303
1533
 
1304
1534
  ChefModernize/ShellOutHelper:
1305
1535
  Description: Use the built-in shell_out helper available in Chef Infra Client 12.11+ instead of calling Mixlib::ShellOut.new('foo').run_command.
1536
+ StyleGuide: '#chefmodernizeshellouthelper'
1306
1537
  Enabled: true
1307
1538
  VersionAdded: '6.5.0'
1308
1539
  Exclude:
@@ -1314,8 +1545,12 @@ ChefModernize/ShellOutHelper:
1314
1545
  # ChefRedundantCode: Cleanup unnecessary code in your cookbooks regardless of Chef Infra Client release
1315
1546
  ###############################
1316
1547
 
1548
+ ChefRedundantCode:
1549
+ StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefredundantcode.md
1550
+
1317
1551
  ChefRedundantCode/ConflictsMetadata:
1318
1552
  Description: Don't use the deprecated 'conflicts' metadata value
1553
+ StyleGuide: '#chefredundantcodeconflictsmetadata'
1319
1554
  Enabled: true
1320
1555
  VersionAdded: '5.1.0'
1321
1556
  VersionChanged: '5.15.0'
@@ -1324,6 +1559,7 @@ ChefRedundantCode/ConflictsMetadata:
1324
1559
 
1325
1560
  ChefRedundantCode/SuggestsMetadata:
1326
1561
  Description: The suggests metadata.rb method is not used and is unnecessary in cookbooks.
1562
+ StyleGuide: '#chefredundantcodesuggestsmetadata'
1327
1563
  Enabled: true
1328
1564
  VersionAdded: '5.1.0'
1329
1565
  VersionChanged: '5.15.0'
@@ -1332,6 +1568,7 @@ ChefRedundantCode/SuggestsMetadata:
1332
1568
 
1333
1569
  ChefRedundantCode/ProvidesMetadata:
1334
1570
  Description: The provides metadata.rb method is not used and is unnecessary in cookbooks.
1571
+ StyleGuide: '#chefredundantcodeprovidesmetadata'
1335
1572
  Enabled: true
1336
1573
  VersionAdded: '5.1.0'
1337
1574
  VersionChanged: '5.15.0'
@@ -1340,6 +1577,7 @@ ChefRedundantCode/ProvidesMetadata:
1340
1577
 
1341
1578
  ChefRedundantCode/ReplacesMetadata:
1342
1579
  Description: The replaces metadata.rb method is not used and is unnecessary in cookbooks.
1580
+ StyleGuide: '#chefredundantcodereplacesmetadata'
1343
1581
  Enabled: true
1344
1582
  VersionAdded: '5.1.0'
1345
1583
  VersionChanged: '5.15.0'
@@ -1348,6 +1586,7 @@ ChefRedundantCode/ReplacesMetadata:
1348
1586
 
1349
1587
  ChefRedundantCode/AttributeMetadata:
1350
1588
  Description: The attribute metadata.rb method is not used and is unnecessary in cookbooks.
1589
+ StyleGuide: '#chefredundantcodeattributemetadata'
1351
1590
  Enabled: true
1352
1591
  VersionAdded: '5.1.0'
1353
1592
  VersionChanged: '5.15.0'
@@ -1356,6 +1595,7 @@ ChefRedundantCode/AttributeMetadata:
1356
1595
 
1357
1596
  ChefRedundantCode/LongDescriptionMetadata:
1358
1597
  Description: The long_description metadata.rb method is not used and is unnecessary in cookbooks
1598
+ StyleGuide: '#chefredundantcodelongdescriptionmetadata'
1359
1599
  Enabled: true
1360
1600
  VersionAdded: '5.2.0'
1361
1601
  VersionChanged: '5.15.0'
@@ -1364,6 +1604,7 @@ ChefRedundantCode/LongDescriptionMetadata:
1364
1604
 
1365
1605
  ChefRedundantCode/RecipeMetadata:
1366
1606
  Description: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the README.md file instead.
1607
+ StyleGuide: '#chefredundantcoderecipemetadata'
1367
1608
  Enabled: true
1368
1609
  VersionAdded: '5.6.0'
1369
1610
  VersionChanged: '5.15.0'
@@ -1372,6 +1613,7 @@ ChefRedundantCode/RecipeMetadata:
1372
1613
 
1373
1614
  ChefRedundantCode/ResourceWithNothingAction:
1374
1615
  Description: There is no need to define a :nothing action in your resource as Chef Infra Client provides the :nothing action by default for every resource.
1616
+ StyleGuide: '#chefredundantcoderesourcewithnothingaction'
1375
1617
  Enabled: true
1376
1618
  VersionAdded: '5.12.0'
1377
1619
  VersionChanged: '5.15.0'
@@ -1382,6 +1624,7 @@ ChefRedundantCode/ResourceWithNothingAction:
1382
1624
 
1383
1625
  ChefRedundantCode/UnnecessaryNameProperty:
1384
1626
  Description: There is no need to define a property named :name in a resource as Chef Infra defines that property for all resources by default.
1627
+ StyleGuide: '#chefredundantcodeunnecessarynameproperty'
1385
1628
  Enabled: true
1386
1629
  VersionAdded: '5.8.0'
1387
1630
  VersionChanged: '5.15.0'
@@ -1391,6 +1634,7 @@ ChefRedundantCode/UnnecessaryNameProperty:
1391
1634
 
1392
1635
  ChefRedundantCode/PropertyWithRequiredAndDefault:
1393
1636
  Description: Resource property should not be both required and have a default value
1637
+ StyleGuide: '#chefredundantcodepropertywithrequiredanddefault'
1394
1638
  Enabled: true
1395
1639
  VersionAdded: '5.1.0'
1396
1640
  VersionChanged: '5.15.0'
@@ -1400,6 +1644,7 @@ ChefRedundantCode/PropertyWithRequiredAndDefault:
1400
1644
 
1401
1645
  ChefRedundantCode/NamePropertyIsRequired:
1402
1646
  Description: Resource properties marked as name properties should not also be required properties
1647
+ StyleGuide: '#chefredundantcodenamepropertyisrequired'
1403
1648
  Enabled: true
1404
1649
  VersionAdded: '5.1.0'
1405
1650
  VersionChanged: '5.15.0'
@@ -1409,6 +1654,7 @@ ChefRedundantCode/NamePropertyIsRequired:
1409
1654
 
1410
1655
  ChefRedundantCode/CustomResourceWithAllowedActions:
1411
1656
  Description: It is not necessary to set `actions` or `allowed_actions` in custom resources as Chef Infra Client determines these automatically from the set of all actions defined in the resource.
1657
+ StyleGuide: '#chefredundantcodecustomresourcewithallowedactions'
1412
1658
  Enabled: true
1413
1659
  VersionAdded: '5.2.0'
1414
1660
  VersionChanged: '5.15.0'
@@ -1417,6 +1663,7 @@ ChefRedundantCode/CustomResourceWithAllowedActions:
1417
1663
 
1418
1664
  ChefRedundantCode/SensitivePropertyInResource:
1419
1665
  Description: Every Chef Infra resources already include a sensitive property with a default value of false.
1666
+ StyleGuide: '#chefredundantcodesensitivepropertyinresource'
1420
1667
  Enabled: true
1421
1668
  VersionAdded: '5.16.0'
1422
1669
  Include:
@@ -1425,6 +1672,7 @@ ChefRedundantCode/SensitivePropertyInResource:
1425
1672
 
1426
1673
  ChefRedundantCode/UnnecessaryDesiredState:
1427
1674
  Description: 'There is no need to set a property to desired_state: true as all properties have a desired_state of true by default.'
1675
+ StyleGuide: '#chefredundantcodeunnecessarydesiredstate'
1428
1676
  Enabled: true
1429
1677
  VersionAdded: '5.16.0'
1430
1678
  Include:
@@ -1433,6 +1681,7 @@ ChefRedundantCode/UnnecessaryDesiredState:
1433
1681
 
1434
1682
  ChefRedundantCode/AptRepositoryNotifiesAptUpdate:
1435
1683
  Description: There is no need to notify an apt-get update when an apt_repository is created as this is done automatically by the apt_repository resource.
1684
+ StyleGuide: '#chefredundantcodeaptrepositorynotifiesaptupdate'
1436
1685
  Enabled: true
1437
1686
  VersionAdded: '5.17.0'
1438
1687
  Exclude:
@@ -1442,6 +1691,7 @@ ChefRedundantCode/AptRepositoryNotifiesAptUpdate:
1442
1691
 
1443
1692
  ChefRedundantCode/AptRepositoryDistributionDefault:
1444
1693
  Description: There is no need to pass `distribution node['lsb']['codename']` to an apt_repository resource as this is done automatically by the apt_repository resource.
1694
+ StyleGuide: '#chefredundantcodeaptrepositorydistributiondefault'
1445
1695
  Enabled: true
1446
1696
  VersionAdded: '5.17.0'
1447
1697
  Exclude:
@@ -1451,6 +1701,7 @@ ChefRedundantCode/AptRepositoryDistributionDefault:
1451
1701
 
1452
1702
  ChefRedundantCode/GroupingMetadata:
1453
1703
  Description: The grouping metadata.rb method is not used and is unnecessary in cookbooks.
1704
+ StyleGuide: '#chefredundantcodegroupingmetadata'
1454
1705
  Enabled: true
1455
1706
  VersionAdded: '5.19.0'
1456
1707
  Include:
@@ -1458,6 +1709,7 @@ ChefRedundantCode/GroupingMetadata:
1458
1709
 
1459
1710
  ChefRedundantCode/StringPropertyWithNilDefault:
1460
1711
  Description: Properties have a nil value by default so there is no need to set the default value to nil.
1712
+ StyleGuide: '#chefredundantcodestringpropertywithnildefault'
1461
1713
  Enabled: true
1462
1714
  VersionAdded: '5.21.0'
1463
1715
  Include:
@@ -1466,6 +1718,7 @@ ChefRedundantCode/StringPropertyWithNilDefault:
1466
1718
 
1467
1719
  ChefRedundantCode/PropertySplatRegex:
1468
1720
  Description: There is no need to validate the input of properties in resources using a regex value that will always pass.
1721
+ StyleGuide: '#chefredundantcodepropertysplatregex'
1469
1722
  Enabled: true
1470
1723
  VersionAdded: '5.21.0'
1471
1724
  Include:
@@ -1474,6 +1727,7 @@ ChefRedundantCode/PropertySplatRegex:
1474
1727
 
1475
1728
  ChefRedundantCode/UseCreateIfMissing:
1476
1729
  Description: Use the :create_if_missing action instead of not_if with a ::File.exist(FOO) check.
1730
+ StyleGuide: '#chefredundantcodeusecreateifmissing'
1477
1731
  Enabled: true
1478
1732
  VersionAdded: '6.2.0'
1479
1733
  Exclude:
@@ -1481,12 +1735,34 @@ ChefRedundantCode/UseCreateIfMissing:
1481
1735
  - '**/attributes/*.rb'
1482
1736
  - '**/Berksfile'
1483
1737
 
1738
+ ChefRedundantCode/OhaiAttributeToString:
1739
+ Description: Many Ohai node attributes are already strings and don't need to be cast to strings again
1740
+ StyleGuide: '#ohaiattributetostring'
1741
+ Enabled: true
1742
+ VersionAdded: '6.10.0'
1743
+ Exclude:
1744
+ - '**/metadata.rb'
1745
+ - '**/Berksfile'
1746
+
1747
+ ChefRedundantCode/MultiplePlatformChecks:
1748
+ Description: You can pass multiple values to the platform? and platform_family? helpers instead of calling the helpers multiple times.
1749
+ StyleGuide: '#multipleplatformchecks'
1750
+ Enabled: true
1751
+ VersionAdded: '6.10.0'
1752
+ Exclude:
1753
+ - '**/metadata.rb'
1754
+ - '**/Berksfile'
1755
+
1484
1756
  ###############################
1485
- # Migrating to new patterns
1757
+ # ChefEffortless: Migrating to new patterns
1486
1758
  ###############################
1487
1759
 
1760
+ ChefEffortless:
1761
+ StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefeffortless.md
1762
+
1488
1763
  ChefEffortless/CookbookUsesSearch:
1489
1764
  Description: Cookbook uses search, which cannot be used in the Effortless Infra pattern
1765
+ StyleGuide: '#chefeffortlesscookbookusessearch'
1490
1766
  Enabled: false
1491
1767
  VersionAdded: '5.1.0'
1492
1768
  Exclude:
@@ -1495,6 +1771,7 @@ ChefEffortless/CookbookUsesSearch:
1495
1771
 
1496
1772
  ChefEffortless/CookbookUsesDatabags:
1497
1773
  Description: Cookbook uses data bags, which cannot be used in the Effortless Infra pattern
1774
+ StyleGuide: '#chefeffortlesscookbookusesdatabags'
1498
1775
  Enabled: false
1499
1776
  VersionAdded: '5.1.0'
1500
1777
  Exclude:
@@ -1503,6 +1780,7 @@ ChefEffortless/CookbookUsesDatabags:
1503
1780
 
1504
1781
  ChefEffortless/CookbookUsesEnvironmments:
1505
1782
  Description: Cookbook uses environments, which cannot be used in the Effortless Infra pattern
1783
+ StyleGuide: '#chefeffortlesscookbookusesenvironments'
1506
1784
  Enabled: false
1507
1785
  VersionAdded: '5.10.0'
1508
1786
  Exclude:
@@ -1511,6 +1789,7 @@ ChefEffortless/CookbookUsesEnvironmments:
1511
1789
 
1512
1790
  ChefEffortless/CookbookUsesPolicygroups:
1513
1791
  Description: Cookbook uses Policy Groups, which cannot be used in the Effortless Infra pattern
1792
+ StyleGuide: '#chefeffortlesscookbookusespolicygroups'
1514
1793
  Enabled: false
1515
1794
  VersionAdded: '5.10.0'
1516
1795
  Exclude:
@@ -1519,6 +1798,7 @@ ChefEffortless/CookbookUsesPolicygroups:
1519
1798
 
1520
1799
  ChefEffortless/CookbookUsesRoles:
1521
1800
  Description: Cookbook uses Roles, which cannot be used in the Effortless Infra pattern
1801
+ StyleGuide: '#chefeffortlesscookbookusesroles'
1522
1802
  Enabled: false
1523
1803
  VersionAdded: '5.10.0'
1524
1804
  Exclude:
@@ -1527,6 +1807,7 @@ ChefEffortless/CookbookUsesRoles:
1527
1807
 
1528
1808
  ChefEffortless/SearchForEnvironmentsOrRoles:
1529
1809
  Description: Cookbook uses search with a node query that looks for a role or environment
1810
+ StyleGuide: '#chefeffortlesssearchforenvironmentsorroles'
1530
1811
  Enabled: false
1531
1812
  VersionAdded: '5.11.0'
1532
1813
  Exclude:
@@ -1535,6 +1816,7 @@ ChefEffortless/SearchForEnvironmentsOrRoles:
1535
1816
 
1536
1817
  ChefEffortless/Berksfile:
1537
1818
  Description: Policyfiles should be used for cookbook dependency solving instead of a Berkshelf Berksfile.
1819
+ StyleGuide: '#chefeffortlessberksfile'
1538
1820
  Enabled: false
1539
1821
  VersionAdded: '5.12.0'
1540
1822
  Include:
@@ -1544,8 +1826,6 @@ ChefEffortless/Berksfile:
1544
1826
 
1545
1827
  Layout/AccessModifierIndentation:
1546
1828
  Enabled: true
1547
- Naming/AccessorMethodName:
1548
- Enabled: true
1549
1829
  Layout/AlignArray:
1550
1830
  Enabled: true
1551
1831
  Layout/AlignHash:
@@ -2199,3 +2479,7 @@ Style/MultilineWhenThen:
2199
2479
  # .each_key is a lot more clear that .keys.each
2200
2480
  Style/HashEachMethods:
2201
2481
  Enabled: true
2482
+
2483
+ # We want to catch this deprecation in cookbooks
2484
+ Lint/DeprecatedOpenSSLConstant:
2485
+ Enabled: true