cookstyle 6.19.5 → 7.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -1
  3. data/config/cookstyle.yml +254 -235
  4. data/config/disable_all.yml +20 -0
  5. data/config/upstream.yml +138 -54
  6. data/cookstyle.gemspec +1 -1
  7. data/lib/cookstyle/version.rb +2 -2
  8. data/lib/rubocop/cop/chef/correctness/block_guard_clause_string_only.rb +1 -1
  9. data/lib/rubocop/cop/chef/correctness/chef_application_fatal.rb +2 -1
  10. data/lib/rubocop/cop/chef/correctness/conditional_ruby_shellout.rb +1 -1
  11. data/lib/rubocop/cop/chef/correctness/dnf_package_allow_downgrades.rb +1 -1
  12. data/lib/rubocop/cop/chef/correctness/incorrect_library_injection.rb +2 -1
  13. data/lib/rubocop/cop/chef/correctness/invalid_default_action.rb +1 -1
  14. data/lib/rubocop/cop/chef/correctness/invalid_notification_timing.rb +1 -1
  15. data/lib/rubocop/cop/chef/correctness/invalid_platform_family_helper.rb +1 -1
  16. data/lib/rubocop/cop/chef/correctness/invalid_platform_family_values_in_case.rb +1 -1
  17. data/lib/rubocop/cop/chef/correctness/invalid_platform_helper.rb +1 -1
  18. data/lib/rubocop/cop/chef/correctness/invalid_platform_metadata.rb +1 -1
  19. data/lib/rubocop/cop/chef/correctness/invalid_platform_values_in_case.rb +2 -1
  20. data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_family_helper.rb +1 -1
  21. data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_helper.rb +1 -1
  22. data/lib/rubocop/cop/chef/correctness/invalid_version_metadata.rb +2 -1
  23. data/lib/rubocop/cop/chef/correctness/lazy_eval_node_attribute_defaults.rb +1 -1
  24. data/lib/rubocop/cop/chef/correctness/lazy_in_resource_guard.rb +1 -1
  25. data/lib/rubocop/cop/chef/correctness/macos_userdefaults_invalid_type.rb +1 -1
  26. data/lib/rubocop/cop/chef/correctness/malformed_value_for_platform.rb +1 -1
  27. data/lib/rubocop/cop/chef/correctness/metadata_missing_name.rb +1 -1
  28. data/lib/rubocop/cop/chef/correctness/node_normal.rb +2 -1
  29. data/lib/rubocop/cop/chef/correctness/node_normal_unless.rb +2 -1
  30. data/lib/rubocop/cop/chef/correctness/node_save.rb +2 -1
  31. data/lib/rubocop/cop/chef/correctness/notifies_action_not_symbol.rb +1 -1
  32. data/lib/rubocop/cop/chef/correctness/octal_mode_as_string.rb +48 -0
  33. data/lib/rubocop/cop/chef/correctness/openssl_password_helpers.rb +1 -1
  34. data/lib/rubocop/cop/chef/correctness/powershell_delete_file.rb +1 -1
  35. data/lib/rubocop/cop/chef/correctness/property_without_type.rb +1 -1
  36. data/lib/rubocop/cop/chef/correctness/resource_sets_internal_properties.rb +1 -1
  37. data/lib/rubocop/cop/chef/correctness/resource_sets_name_property.rb +1 -1
  38. data/lib/rubocop/cop/chef/correctness/resource_with_none_action.rb +1 -1
  39. data/lib/rubocop/cop/chef/correctness/scoped_file_exist.rb +1 -1
  40. data/lib/rubocop/cop/chef/correctness/service_resource.rb +1 -1
  41. data/lib/rubocop/cop/chef/correctness/supports_must_be_float.rb +1 -1
  42. data/lib/rubocop/cop/chef/correctness/tmp_path.rb +1 -1
  43. data/lib/rubocop/cop/chef/deprecation/ use_automatic_resource_name.rb +1 -1
  44. data/lib/rubocop/cop/chef/deprecation/cb_depends_on_self.rb +1 -1
  45. data/lib/rubocop/cop/chef/deprecation/chef_handler_recipe.rb +1 -1
  46. data/lib/rubocop/cop/chef/deprecation/chef_handler_supports.rb +1 -1
  47. data/lib/rubocop/cop/chef/deprecation/chef_rest.rb +1 -1
  48. data/lib/rubocop/cop/chef/deprecation/chef_rewind.rb +1 -1
  49. data/lib/rubocop/cop/chef/deprecation/chef_shellout.rb +2 -2
  50. data/lib/rubocop/cop/chef/deprecation/chef_windows_platform_helper.rb +2 -1
  51. data/lib/rubocop/cop/chef/deprecation/chefdk_generators.rb +1 -1
  52. data/lib/rubocop/cop/chef/deprecation/cheffile.rb +1 -1
  53. data/lib/rubocop/cop/chef/deprecation/chefspec_coverage_report.rb +1 -1
  54. data/lib/rubocop/cop/chef/deprecation/chefspec_legacy_runner.rb +1 -1
  55. data/lib/rubocop/cop/chef/deprecation/chocolatey_package_uninstall_action.rb +1 -1
  56. data/lib/rubocop/cop/chef/deprecation/depends_compat_resource.rb +1 -1
  57. data/lib/rubocop/cop/chef/deprecation/depends_partial_search.rb +1 -1
  58. data/lib/rubocop/cop/chef/deprecation/depends_poise.rb +1 -1
  59. data/lib/rubocop/cop/chef/deprecation/deprecated_chefspec_platform.rb +1 -3
  60. data/lib/rubocop/cop/chef/deprecation/deprecated_mixins.rb +1 -1
  61. data/lib/rubocop/cop/chef/deprecation/deprecated_platform_methods.rb +2 -1
  62. data/lib/rubocop/cop/chef/deprecation/deprecated_shellout_methods.rb +1 -1
  63. data/lib/rubocop/cop/chef/deprecation/deprecated_windows_version_check.rb +1 -1
  64. data/lib/rubocop/cop/chef/deprecation/deprecated_yum_repository_properties.rb +1 -1
  65. data/lib/rubocop/cop/chef/deprecation/easy_install.rb +1 -1
  66. data/lib/rubocop/cop/chef/deprecation/eol_audit_mode.rb +1 -1
  67. data/lib/rubocop/cop/chef/deprecation/epic_fail.rb +1 -1
  68. data/lib/rubocop/cop/chef/deprecation/erl_call.rb +1 -1
  69. data/lib/rubocop/cop/chef/deprecation/execute_path_property.rb +1 -1
  70. data/lib/rubocop/cop/chef/deprecation/execute_relative_creates_without_cwd.rb +1 -1
  71. data/lib/rubocop/cop/chef/deprecation/hwrp_without_provides.rb +1 -1
  72. data/lib/rubocop/cop/chef/deprecation/inherits_compat_resource.rb +1 -1
  73. data/lib/rubocop/cop/chef/deprecation/launchd_deprecated_hash_property.rb +1 -1
  74. data/lib/rubocop/cop/chef/deprecation/legacy_notify_syntax.rb +2 -2
  75. data/lib/rubocop/cop/chef/deprecation/legacy_yum_cookbook_recipes.rb +1 -1
  76. data/lib/rubocop/cop/chef/deprecation/locale_lc_all_property.rb +1 -1
  77. data/lib/rubocop/cop/chef/deprecation/log_resource_notifications.rb +3 -3
  78. data/lib/rubocop/cop/chef/deprecation/macos_userdefaults_global_property.rb +1 -1
  79. data/lib/rubocop/cop/chef/deprecation/name_property_and_default.rb +1 -1
  80. data/lib/rubocop/cop/chef/deprecation/node_deep_fetch.rb +3 -1
  81. data/lib/rubocop/cop/chef/deprecation/node_methods_not_attributes.rb +22 -27
  82. data/lib/rubocop/cop/chef/deprecation/node_set.rb +2 -1
  83. data/lib/rubocop/cop/chef/deprecation/node_set_unless.rb +2 -1
  84. data/lib/rubocop/cop/chef/deprecation/node_set_without_level.rb +2 -1
  85. data/lib/rubocop/cop/chef/deprecation/partial_search_class_usage.rb +2 -1
  86. data/lib/rubocop/cop/chef/deprecation/partial_search_helper_usage.rb +1 -1
  87. data/lib/rubocop/cop/chef/deprecation/poise_archive.rb +1 -1
  88. data/lib/rubocop/cop/chef/deprecation/powershell_cookbook_helpers.rb +2 -1
  89. data/lib/rubocop/cop/chef/deprecation/require_recipe.rb +1 -1
  90. data/lib/rubocop/cop/chef/deprecation/resource_overrides_provides_method.rb +3 -3
  91. data/lib/rubocop/cop/chef/deprecation/resource_uses_dsl_name_method.rb +1 -1
  92. data/lib/rubocop/cop/chef/deprecation/resource_uses_only_resource_name.rb +1 -1
  93. data/lib/rubocop/cop/chef/deprecation/resource_uses_provider_base_method.rb +1 -1
  94. data/lib/rubocop/cop/chef/deprecation/resource_uses_updated_method.rb +1 -1
  95. data/lib/rubocop/cop/chef/deprecation/ruby_27_keyword_argument_warnings.rb +1 -1
  96. data/lib/rubocop/cop/chef/deprecation/ruby_block_create_action.rb +1 -1
  97. data/lib/rubocop/cop/chef/deprecation/run_command_helper.rb +1 -1
  98. data/lib/rubocop/cop/chef/deprecation/search_uses_positional_parameters.rb +1 -1
  99. data/lib/rubocop/cop/chef/deprecation/use_inline_resources.rb +1 -1
  100. data/lib/rubocop/cop/chef/deprecation/use_yaml_dump.rb +47 -0
  101. data/lib/rubocop/cop/chef/deprecation/user_supports_property.rb +1 -1
  102. data/lib/rubocop/cop/chef/deprecation/verify_property_file_expansion.rb +1 -1
  103. data/lib/rubocop/cop/chef/deprecation/windows_feature_servermanagercmd.rb +1 -1
  104. data/lib/rubocop/cop/chef/deprecation/windows_package_installer_type_string.rb +1 -1
  105. data/lib/rubocop/cop/chef/deprecation/windows_task_change_action.rb +1 -1
  106. data/lib/rubocop/cop/chef/deprecation/windows_version_helpers.rb +2 -1
  107. data/lib/rubocop/cop/chef/deprecation/xml_ruby_recipe.rb +1 -1
  108. data/lib/rubocop/cop/chef/deprecation/yum_dnf_compat_recipe.rb +1 -1
  109. data/lib/rubocop/cop/chef/effortless/berksfile.rb +1 -1
  110. data/lib/rubocop/cop/chef/effortless/chef_vault_used.rb +1 -1
  111. data/lib/rubocop/cop/chef/effortless/data_bags.rb +1 -1
  112. data/lib/rubocop/cop/chef/effortless/depends_chef_vault.rb +1 -1
  113. data/lib/rubocop/cop/chef/effortless/node_environment.rb +1 -1
  114. data/lib/rubocop/cop/chef/effortless/node_policygroup.rb +1 -1
  115. data/lib/rubocop/cop/chef/effortless/node_roles.rb +1 -1
  116. data/lib/rubocop/cop/chef/effortless/search_for_environments_or_roles.rb +1 -1
  117. data/lib/rubocop/cop/chef/effortless/search_used.rb +1 -1
  118. data/lib/rubocop/cop/chef/modernize/action_method_in_resource.rb +1 -1
  119. data/lib/rubocop/cop/chef/modernize/allowed_actions_initializer.rb +1 -1
  120. data/lib/rubocop/cop/chef/modernize/apt_default_recipe.rb +1 -1
  121. data/lib/rubocop/cop/chef/modernize/berksfile_source.rb +1 -1
  122. data/lib/rubocop/cop/chef/modernize/build_essential.rb +1 -1
  123. data/lib/rubocop/cop/chef/modernize/chef_14_resources.rb +1 -1
  124. data/lib/rubocop/cop/chef/modernize/chef_gem_nokogiri.rb +1 -1
  125. data/lib/rubocop/cop/chef/modernize/compile_time_resources.rb +2 -1
  126. data/lib/rubocop/cop/chef/modernize/conditional_using_test.rb +2 -2
  127. data/lib/rubocop/cop/chef/modernize/cron_d_file_or_template.rb +1 -1
  128. data/lib/rubocop/cop/chef/modernize/cron_manage_resource.rb +1 -1
  129. data/lib/rubocop/cop/chef/modernize/databag_helpers.rb +2 -1
  130. data/lib/rubocop/cop/chef/modernize/default_action_initializer.rb +1 -1
  131. data/lib/rubocop/cop/chef/modernize/defines_chefspec_matchers.rb +1 -1
  132. data/lib/rubocop/cop/chef/modernize/definitions.rb +1 -1
  133. data/lib/rubocop/cop/chef/modernize/depends_zypper_cookbook.rb +1 -1
  134. data/lib/rubocop/cop/chef/modernize/dsl_include_in_resource.rb +1 -1
  135. data/lib/rubocop/cop/chef/modernize/empty_resource_initialize.rb +1 -1
  136. data/lib/rubocop/cop/chef/modernize/execute_apt_update.rb +1 -1
  137. data/lib/rubocop/cop/chef/modernize/execute_sc_exe.rb +1 -1
  138. data/lib/rubocop/cop/chef/modernize/execute_sleep.rb +1 -1
  139. data/lib/rubocop/cop/chef/modernize/execute_sysctl.rb +1 -1
  140. data/lib/rubocop/cop/chef/modernize/execute_tzutil.rb +1 -1
  141. data/lib/rubocop/cop/chef/modernize/foodcritic_comments.rb +1 -1
  142. data/lib/rubocop/cop/chef/modernize/if_provides_default_action.rb +1 -1
  143. data/lib/rubocop/cop/chef/modernize/includes_mixin_shellout.rb +1 -1
  144. data/lib/rubocop/cop/chef/modernize/libarchive_file.rb +1 -1
  145. data/lib/rubocop/cop/chef/modernize/macos_user_defaults.rb +1 -1
  146. data/lib/rubocop/cop/chef/modernize/minitest_handler_usage.rb +1 -1
  147. data/lib/rubocop/cop/chef/modernize/node_init_package.rb +3 -2
  148. data/lib/rubocop/cop/chef/modernize/node_roles_include.rb +2 -1
  149. data/lib/rubocop/cop/chef/modernize/ohai_default_recipe.rb +1 -1
  150. data/lib/rubocop/cop/chef/modernize/openssl_rsa_key_resource.rb +1 -1
  151. data/lib/rubocop/cop/chef/modernize/openssl_x509_resource.rb +1 -1
  152. data/lib/rubocop/cop/chef/modernize/osx_config_profile_resource.rb +1 -1
  153. data/lib/rubocop/cop/chef/modernize/powershell_expand_archive.rb +1 -1
  154. data/lib/rubocop/cop/chef/modernize/powershell_guard_interpreter.rb +1 -1
  155. data/lib/rubocop/cop/chef/modernize/powershell_install_package.rb +1 -1
  156. data/lib/rubocop/cop/chef/modernize/powershell_install_windowsfeature.rb +1 -1
  157. data/lib/rubocop/cop/chef/modernize/property_with_name_attribute.rb +1 -1
  158. data/lib/rubocop/cop/chef/modernize/provides_initializer.rb +1 -1
  159. data/lib/rubocop/cop/chef/modernize/resource_name_initializer.rb +1 -1
  160. data/lib/rubocop/cop/chef/modernize/resource_set_or_return.rb +1 -1
  161. data/lib/rubocop/cop/chef/modernize/resource_with_attributes.rb +1 -1
  162. data/lib/rubocop/cop/chef/modernize/respond_to_compile_time.rb +1 -1
  163. data/lib/rubocop/cop/chef/modernize/respond_to_metadata.rb +2 -2
  164. data/lib/rubocop/cop/chef/modernize/respond_to_provides.rb +10 -10
  165. data/lib/rubocop/cop/chef/modernize/respond_to_resource_name.rb +2 -2
  166. data/lib/rubocop/cop/chef/modernize/sc_windows_resource.rb +1 -1
  167. data/lib/rubocop/cop/chef/modernize/seven_zip_archive.rb +1 -1
  168. data/lib/rubocop/cop/chef/modernize/shell_out_helper.rb +2 -1
  169. data/lib/rubocop/cop/chef/modernize/shellouts_to_chocolatey.rb +1 -1
  170. data/lib/rubocop/cop/chef/modernize/simplify_apt_ppa_setup.rb +1 -1
  171. data/lib/rubocop/cop/chef/modernize/sysctl_param_resource.rb +1 -1
  172. data/lib/rubocop/cop/chef/modernize/unnecessary_mixlib_shellout_require.rb +1 -1
  173. data/lib/rubocop/cop/chef/modernize/use_multipackage_installs.rb +1 -1
  174. data/lib/rubocop/cop/chef/modernize/use_require_relative.rb +1 -1
  175. data/lib/rubocop/cop/chef/modernize/whyrun_supported_true.rb +1 -1
  176. data/lib/rubocop/cop/chef/modernize/windows_default_recipe.rb +1 -1
  177. data/lib/rubocop/cop/chef/modernize/windows_registry_uac.rb +4 -4
  178. data/lib/rubocop/cop/chef/modernize/windows_zipfile.rb +1 -1
  179. data/lib/rubocop/cop/chef/modernize/zipfile_resource.rb +1 -1
  180. data/lib/rubocop/cop/chef/modernize/zypper_repo.rb +1 -1
  181. data/lib/rubocop/cop/chef/redundant/apt_repository_distribution_default.rb +1 -1
  182. data/lib/rubocop/cop/chef/redundant/apt_repository_notifies_apt_update.rb +1 -1
  183. data/lib/rubocop/cop/chef/redundant/attribute_metadata.rb +1 -1
  184. data/lib/rubocop/cop/chef/redundant/conflicts_metadata.rb +1 -1
  185. data/lib/rubocop/cop/chef/redundant/custom_resource_with_allowed_actions.rb +1 -1
  186. data/lib/rubocop/cop/chef/redundant/double_compile_time.rb +2 -1
  187. data/lib/rubocop/cop/chef/redundant/grouping_metadata.rb +1 -1
  188. data/lib/rubocop/cop/chef/redundant/long_description_metadata.rb +1 -1
  189. data/lib/rubocop/cop/chef/redundant/multiple_platform_checks.rb +1 -1
  190. data/lib/rubocop/cop/chef/redundant/name_property_and_required.rb +2 -1
  191. data/lib/rubocop/cop/chef/redundant/ohai_attribute_to_string.rb +2 -1
  192. data/lib/rubocop/cop/chef/redundant/property_splat_regex.rb +2 -1
  193. data/lib/rubocop/cop/chef/redundant/property_with_default_and_required.rb +1 -1
  194. data/lib/rubocop/cop/chef/redundant/provides_metadata.rb +1 -1
  195. data/lib/rubocop/cop/chef/redundant/recipe_metadata.rb +1 -1
  196. data/lib/rubocop/cop/chef/redundant/replaces_metadata.rb +1 -1
  197. data/lib/rubocop/cop/chef/redundant/resource_with_nothing_action.rb +1 -1
  198. data/lib/rubocop/cop/chef/redundant/sensitive_property_in_resource.rb +1 -1
  199. data/lib/rubocop/cop/chef/redundant/string_property_with_nil_default.rb +1 -1
  200. data/lib/rubocop/cop/chef/redundant/suggests_metadata.rb +1 -1
  201. data/lib/rubocop/cop/chef/redundant/unnecessary_desired_state.rb +13 -12
  202. data/lib/rubocop/cop/chef/redundant/unnecessary_name_property.rb +1 -1
  203. data/lib/rubocop/cop/chef/redundant/use_create_if_missing.rb +1 -1
  204. data/lib/rubocop/cop/chef/sharing/default_maintainer_metadata.rb +1 -1
  205. data/lib/rubocop/cop/chef/sharing/empty_metadata_field.rb +1 -1
  206. data/lib/rubocop/cop/chef/sharing/include_property_descriptions.rb +1 -1
  207. data/lib/rubocop/cop/chef/sharing/include_resource_descriptions.rb +1 -1
  208. data/lib/rubocop/cop/chef/sharing/include_resource_examples.rb +1 -1
  209. data/lib/rubocop/cop/chef/sharing/insecure_cookbook_url.rb +1 -1
  210. data/lib/rubocop/cop/chef/sharing/invalid_license_string.rb +1 -1
  211. data/lib/rubocop/cop/chef/style/attribute_keys.rb +2 -1
  212. data/lib/rubocop/cop/chef/style/chef_whaaat.rb +1 -1
  213. data/lib/rubocop/cop/chef/style/comment_sentence_spacing.rb +1 -1
  214. data/lib/rubocop/cop/chef/style/comments_copyright_format.rb +4 -3
  215. data/lib/rubocop/cop/chef/style/comments_default_copyright.rb +1 -1
  216. data/lib/rubocop/cop/chef/style/comments_format.rb +1 -1
  217. data/lib/rubocop/cop/chef/style/file_mode.rb +1 -1
  218. data/lib/rubocop/cop/chef/style/immediate_notification_timing.rb +1 -1
  219. data/lib/rubocop/cop/chef/style/include_recipe_with_parentheses.rb +1 -1
  220. data/lib/rubocop/cop/chef/style/negating_only_if.rb +1 -1
  221. data/lib/rubocop/cop/chef/style/overly_complex_supports_depends_metadata.rb +1 -1
  222. data/lib/rubocop/cop/chef/style/simplify_platform_major_version_check.rb +2 -1
  223. data/lib/rubocop/cop/chef/style/true_false_resource_properties.rb +1 -1
  224. data/lib/rubocop/cop/chef/style/unnecessary_os_check.rb +2 -1
  225. data/lib/rubocop/cop/chef/style/unnecessary_platform_case_statement.rb +1 -1
  226. data/lib/rubocop/cop/chef/style/use_platform_helpers.rb +2 -1
  227. data/lib/rubocop/monkey_patches/comment_config.rb +1 -1
  228. metadata +7 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47388999a2aa49c2d130f1a553e2d17efec6090b4207e39557fc78acb8c4e5a8
4
- data.tar.gz: c622b97ecf8c86b337c7bc63ff444c4b305a6a249cc40c598ea800a1ba9cae67
3
+ metadata.gz: b7657520e64c1c6c6a5fb35520e8b03b7627c0cbf7f8c97c6b98876188174dd2
4
+ data.tar.gz: 541043c03cc4521990a973bad5b07834c89fa60d1d385ca449c63979917689ce
5
5
  SHA512:
6
- metadata.gz: 4b1f192f83d65beb1360ff7df9648176bbc54398b39eb7e8791f0342f5152e5361bae374514fcb60134cb6348101c78047ab53d57efcfad3cccfa60e03de2234
7
- data.tar.gz: db704725caa2dbfa226e6693bee8ced4adeaaf45d531c5665ff3c602cb7d9b3392676917d814f44b5bb4e7fb015c3c52ce94e812b6ef017fd117210d0ff35252
6
+ metadata.gz: 177c42fe47c369af9a4f83545c0b702ee0407e3e66eb7f055055fa644b24fdc2f99dcfcabe7c1b16c29ed58a90d351a5e8a573a6e7d5beb443cecf0f858e4751
7
+ data.tar.gz: 48ccb6906f3793eabd00fe6f3b3ff1651196375d509ef5d07018552364e1f7b7dce47434d3d8c766b1aa3910b734747c3f39669a5749174f275e51ae6a81fb61
data/Gemfile CHANGED
@@ -17,8 +17,12 @@ group :docs do
17
17
  end
18
18
 
19
19
  group :profiling do
20
- gem 'stackprof'
21
20
  gem 'memory_profiler'
21
+ gem 'stackprof'
22
+ end
23
+
24
+ group :rubocop_gems do
25
+ gem 'rubocop-performance'
22
26
  end
23
27
 
24
28
  group :development do
@@ -7,13 +7,13 @@ AllCops:
7
7
  - Guardfile
8
8
 
9
9
  ###############################
10
- # ChefStyle: Making cookbooks look better
10
+ # Chef/Style: Making cookbooks look better
11
11
  ###############################
12
12
 
13
- ChefStyle:
13
+ Chef/Style:
14
14
  StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefstyle.md
15
15
 
16
- ChefStyle/AttributeKeys:
16
+ Chef/Style/AttributeKeys:
17
17
  Description: Check which style of keys are used to access node attributes.
18
18
  StyleGuide: '#chefstyleattributekeys'
19
19
  Enabled: true
@@ -25,19 +25,19 @@ ChefStyle/AttributeKeys:
25
25
  Exclude:
26
26
  - '**/metadata.rb'
27
27
 
28
- ChefStyle/CopyrightCommentFormat:
28
+ Chef/Style/CopyrightCommentFormat:
29
29
  Description: Properly format copyright dates in comment blocks and ensure dates are up to date
30
30
  StyleGuide: '#chefstylecopyrightcommentformat'
31
31
  Enabled: false
32
32
  VersionAdded: '5.0.0'
33
33
 
34
- ChefStyle/CommentSentenceSpacing:
34
+ Chef/Style/CommentSentenceSpacing:
35
35
  Description: Use a single space after sentences in comments
36
36
  StyleGuide: '#chefstylecommentsentencespacing'
37
37
  Enabled: false
38
38
  VersionAdded: '5.1.0'
39
39
 
40
- ChefStyle/CommentFormat:
40
+ Chef/Style/CommentFormat:
41
41
  Description: Use Chef's unique format for comment headers
42
42
  StyleGuide: '#chefstylecommentformat'
43
43
  Enabled: true
@@ -45,7 +45,7 @@ ChefStyle/CommentFormat:
45
45
  Exclude:
46
46
  - '**/Berksfile'
47
47
 
48
- ChefStyle/FileMode:
48
+ Chef/Style/FileMode:
49
49
  Description: Use strings to represent file modes to avoid confusion between octal and base 10 integer formats.
50
50
  StyleGuide: '#chefstylefilemode'
51
51
  Enabled: true
@@ -55,7 +55,7 @@ ChefStyle/FileMode:
55
55
  - '**/metadata.rb'
56
56
  - '**/Berksfile'
57
57
 
58
- ChefStyle/UsePlatformHelpers:
58
+ Chef/Style/UsePlatformHelpers:
59
59
  Description: Use platform? and platform_family? helpers to check node platform in resources and recipes
60
60
  StyleGuide: '#chefstyleuseplatformhelpers'
61
61
  Enabled: true
@@ -65,7 +65,7 @@ ChefStyle/UsePlatformHelpers:
65
65
  - '**/libraries/*'
66
66
  - '**/Berksfile'
67
67
 
68
- ChefStyle/SimplifyPlatformMajorVersionCheck:
68
+ Chef/Style/SimplifyPlatformMajorVersionCheck:
69
69
  Description: Use node['platform_version'].to_i instead of node['platform_version'].split('.').first or node['platform_version'].split('.')[0]
70
70
  StyleGuide: '#chefstylesimplifyplatformmajorversioncheck'
71
71
  Enabled: true
@@ -74,13 +74,13 @@ ChefStyle/SimplifyPlatformMajorVersionCheck:
74
74
  - '**/metadata.rb'
75
75
  - '**/Berksfile'
76
76
 
77
- ChefStyle/DefaultCopyrightComments:
77
+ Chef/Style/DefaultCopyrightComments:
78
78
  Description: Cookbook copyright comment headers should be updated for a real person or organization.
79
79
  StyleGuide: '#chefstyledefaultcopyrightcomments'
80
80
  Enabled: true
81
81
  VersionAdded: '5.12.0'
82
82
 
83
- ChefStyle/UnnecessaryPlatformCaseStatement:
83
+ Chef/Style/UnnecessaryPlatformCaseStatement:
84
84
  Description: Use the platform?() and platform_family?() helpers instead of a case statement that only includes a single when statement.
85
85
  StyleGuide: '#chefstyleunnecessaryplatformcasestatement'
86
86
  Enabled: true
@@ -89,7 +89,7 @@ ChefStyle/UnnecessaryPlatformCaseStatement:
89
89
  - '**/metadata.rb'
90
90
  - '**/Berksfile'
91
91
 
92
- ChefStyle/ImmediateNotificationTiming:
92
+ Chef/Style/ImmediateNotificationTiming:
93
93
  Description: Use :immediately instead of :immediate for resource notification timing.
94
94
  StyleGuide: '#chefstyleimmediatenotificationtiming'
95
95
  Enabled: true
@@ -99,7 +99,7 @@ ChefStyle/ImmediateNotificationTiming:
99
99
  - '**/metadata.rb'
100
100
  - '**/Berksfile'
101
101
 
102
- ChefStyle/TrueClassFalseClassResourceProperties:
102
+ Chef/Style/TrueClassFalseClassResourceProperties:
103
103
  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.
104
104
  StyleGuide: '#chefstyletrueclassfalseclassresourceproperties'
105
105
  Enabled: true
@@ -108,7 +108,7 @@ ChefStyle/TrueClassFalseClassResourceProperties:
108
108
  - '**/libraries/*.rb'
109
109
  - '**/resources/*.rb'
110
110
 
111
- ChefStyle/OverlyComplexSupportsDependsMetadata:
111
+ Chef/Style/OverlyComplexSupportsDependsMetadata:
112
112
  Description: Don't loop over an array to set cookbook dependencies or supported platforms if you have fewer than three values to set.
113
113
  StyleGuide: '#chefstyleovercomplexsupportsdependsmetadata'
114
114
  Enabled: true
@@ -116,13 +116,13 @@ ChefStyle/OverlyComplexSupportsDependsMetadata:
116
116
  Include:
117
117
  - '**/metadata.rb'
118
118
 
119
- ChefStyle/ChefWhaaat:
119
+ Chef/Style/ChefWhaaat:
120
120
  Description: Do you mean Chef (the company) or a Chef product (e.g. Chef Infra, Chef InSpec, etc)?
121
121
  StyleGuide: '#chefstylechefwhaaat'
122
122
  Enabled: false
123
123
  VersionAdded: '5.20.0'
124
124
 
125
- ChefStyle/UnnecessaryOSCheck:
125
+ Chef/Style/UnnecessaryOSCheck:
126
126
  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.
127
127
  StyleGuide: '#chefstyleunnecessaryoscheck'
128
128
  Enabled: true
@@ -131,7 +131,7 @@ ChefStyle/UnnecessaryOSCheck:
131
131
  - '**/metadata.rb'
132
132
  - '**/Berksfile'
133
133
 
134
- ChefStyle/NegatingOnlyIf:
134
+ Chef/Style/NegatingOnlyIf:
135
135
  Description: Use not_if instead of only_if that negates the Ruby statement with a !
136
136
  StyleGuide: '#chefstylenegatingonlyif'
137
137
  VersionAdded: '6.2.0'
@@ -140,7 +140,7 @@ ChefStyle/NegatingOnlyIf:
140
140
  - '**/metadata.rb'
141
141
  - '**/Berksfile'
142
142
 
143
- ChefStyle/IncludeRecipeWithParentheses:
143
+ Chef/Style/IncludeRecipeWithParentheses:
144
144
  Description: There is no need to wrap the recipe in parentheses when using the include_recipe helper
145
145
  StyleGuide: '#includerecipewithparentheses'
146
146
  VersionAdded: '6.11.0'
@@ -151,13 +151,13 @@ ChefStyle/IncludeRecipeWithParentheses:
151
151
  - '**/Berksfile'
152
152
 
153
153
  ###############################
154
- # ChefCorrectness: Avoiding potential problems
154
+ # Chef/Correctness: Avoiding potential problems
155
155
  ###############################
156
156
 
157
- ChefCorrectness:
157
+ Chef/Correctness:
158
158
  StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefcorrectness.md
159
159
 
160
- ChefCorrectness/ServiceResource:
160
+ Chef/Correctness/ServiceResource:
161
161
  Description: Use a service resource to start and stop services instead of execute resources
162
162
  StyleGuide: '#chefcorrectnessserviceresource'
163
163
  Enabled: true
@@ -167,7 +167,7 @@ ChefCorrectness/ServiceResource:
167
167
  - '**/metadata.rb'
168
168
  - '**/Berksfile'
169
169
 
170
- ChefCorrectness/NodeNormal:
170
+ Chef/Correctness/NodeNormal:
171
171
  Description: Do not use the node.normal method
172
172
  StyleGuide: '#chefcorrectnessnodenormal'
173
173
  Enabled: true
@@ -176,7 +176,7 @@ ChefCorrectness/NodeNormal:
176
176
  - '**/metadata.rb'
177
177
  - '**/Berksfile'
178
178
 
179
- ChefCorrectness/NodeNormalUnless:
179
+ Chef/Correctness/NodeNormalUnless:
180
180
  Description: Do not use the node.normal_unless method
181
181
  Enabled: true
182
182
  VersionAdded: '5.1.0'
@@ -184,7 +184,7 @@ ChefCorrectness/NodeNormalUnless:
184
184
  - '**/metadata.rb'
185
185
  - '**/Berksfile'
186
186
 
187
- ChefCorrectness/TmpPath:
187
+ Chef/Correctness/TmpPath:
188
188
  Description: Use file_cache_path rather than hard-coding tmp paths
189
189
  StyleGuide: '#chefcorrectnessnodenormalunless'
190
190
  Enabled: true
@@ -193,7 +193,7 @@ ChefCorrectness/TmpPath:
193
193
  - '**/metadata.rb'
194
194
  - '**/Berksfile'
195
195
 
196
- ChefCorrectness/InvalidPlatformMetadata:
196
+ Chef/Correctness/InvalidPlatformMetadata:
197
197
  Description: metadata.rb "supports" platform is invalid
198
198
  StyleGuide: '#chefcorrectnessinvalidplatformmetadata'
199
199
  Enabled: true
@@ -201,7 +201,7 @@ ChefCorrectness/InvalidPlatformMetadata:
201
201
  Include:
202
202
  - '**/metadata.rb'
203
203
 
204
- ChefCorrectness/CookbookUsesNodeSave:
204
+ Chef/Correctness/CookbookUsesNodeSave:
205
205
  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.
206
206
  StyleGuide: '#chefcorrectnesscookbookusesnodesave'
207
207
  Enabled: true
@@ -210,7 +210,7 @@ ChefCorrectness/CookbookUsesNodeSave:
210
210
  - '**/metadata.rb'
211
211
  - '**/Berksfile'
212
212
 
213
- ChefCorrectness/MetadataMissingName:
213
+ Chef/Correctness/MetadataMissingName:
214
214
  Description: The metadata.rb file is missing the name field which is required by Chef Infra Client 12 and later
215
215
  StyleGuide: '#chefcorrectnessmetadatamissingname'
216
216
  Enabled: true
@@ -218,7 +218,7 @@ ChefCorrectness/MetadataMissingName:
218
218
  Include:
219
219
  - '**/metadata.rb'
220
220
 
221
- ChefCorrectness/BlockGuardWithOnlyString:
221
+ Chef/Correctness/BlockGuardWithOnlyString:
222
222
  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.
223
223
  StyleGuide: '#chefcorrectnessblockguardwithonlystring'
224
224
  Enabled: true
@@ -228,7 +228,7 @@ ChefCorrectness/BlockGuardWithOnlyString:
228
228
  - '**/metadata.rb'
229
229
  - '**/Berksfile'
230
230
 
231
- ChefCorrectness/ResourceSetsInternalProperties:
231
+ Chef/Correctness/ResourceSetsInternalProperties:
232
232
  Description: Do not set properties used internally by Chef Infra Client to track the system state.
233
233
  StyleGuide: '#chefcorrectnessresourcesetsinternalproperties'
234
234
  Enabled: true
@@ -238,7 +238,7 @@ ChefCorrectness/ResourceSetsInternalProperties:
238
238
  - '**/metadata.rb'
239
239
  - '**/Berksfile'
240
240
 
241
- ChefCorrectness/ResourceSetsNameProperty:
241
+ Chef/Correctness/ResourceSetsNameProperty:
242
242
  Description: Resource sets the name property in the resource instead of using a name_property.
243
243
  StyleGuide: '#chefcorrectnessresourcesetsnameproperty'
244
244
  Enabled: true
@@ -248,7 +248,7 @@ ChefCorrectness/ResourceSetsNameProperty:
248
248
  - '**/metadata.rb'
249
249
  - '**/Berksfile'
250
250
 
251
- ChefCorrectness/ResourceWithNoneAction:
251
+ Chef/Correctness/ResourceWithNoneAction:
252
252
  Description: Resource uses the nonexistent :none action instead of the :nothing action
253
253
  StyleGuide: '#chefcorrectnessresourcewithnoneaction'
254
254
  Enabled: true
@@ -258,7 +258,7 @@ ChefCorrectness/ResourceWithNoneAction:
258
258
  - '**/metadata.rb'
259
259
  - '**/Berksfile'
260
260
 
261
- ChefCorrectness/InvalidVersionMetadata:
261
+ Chef/Correctness/InvalidVersionMetadata:
262
262
  Description: Cookbook metadata.rb version field should follow X.Y.Z version format.
263
263
  StyleGuide: '#chefcorrectnessinvalidversionmetadata'
264
264
  Enabled: true
@@ -266,7 +266,7 @@ ChefCorrectness/InvalidVersionMetadata:
266
266
  Include:
267
267
  - '**/metadata.rb'
268
268
 
269
- ChefCorrectness/NotifiesActionNotSymbol:
269
+ Chef/Correctness/NotifiesActionNotSymbol:
270
270
  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.
271
271
  StyleGuide: '#chefcorrectnessnotifiesactionnotsymbol'
272
272
  Enabled: true
@@ -276,7 +276,7 @@ ChefCorrectness/NotifiesActionNotSymbol:
276
276
  - '**/metadata.rb'
277
277
  - '**/Berksfile'
278
278
 
279
- ChefCorrectness/IncorrectLibraryInjection:
279
+ Chef/Correctness/IncorrectLibraryInjection:
280
280
  Description: Libraries should be injected into the Chef::DSL::Recipe or Chef::DSL::Resource classes and not Recipe/Resource/Provider classes directly.
281
281
  StyleGuide: '#chefcorrectnessincorrectlibraryinjection'
282
282
  Enabled: true
@@ -285,7 +285,7 @@ ChefCorrectness/IncorrectLibraryInjection:
285
285
  - '**/metadata.rb'
286
286
  - '**/Berksfile'
287
287
 
288
- ChefCorrectness/InvalidPlatformHelper:
288
+ Chef/Correctness/InvalidPlatformHelper:
289
289
  Description: Pass valid platforms to the platform? helper.
290
290
  StyleGuide: '#chefcorrectnessinvalidplatformhelper'
291
291
  Enabled: true
@@ -294,7 +294,7 @@ ChefCorrectness/InvalidPlatformHelper:
294
294
  - '**/metadata.rb'
295
295
  - '**/Berksfile'
296
296
 
297
- ChefCorrectness/InvalidPlatformFamilyHelper:
297
+ Chef/Correctness/InvalidPlatformFamilyHelper:
298
298
  Description: Pass valid platform families to the platform_family? helper.
299
299
  StyleGuide: '#chefcorrectnessinvalidplatformfamilyhelper'
300
300
  Enabled: true
@@ -303,7 +303,7 @@ ChefCorrectness/InvalidPlatformFamilyHelper:
303
303
  - '**/metadata.rb'
304
304
  - '**/Berksfile'
305
305
 
306
- ChefCorrectness/ScopedFileExist:
306
+ Chef/Correctness/ScopedFileExist:
307
307
  Description: Scope file exist to access the correct File class by using ::File.exist? not File.exist?.
308
308
  StyleGuide: '#chefcorrectnessscopedfileexist'
309
309
  Enabled: true
@@ -313,7 +313,7 @@ ChefCorrectness/ScopedFileExist:
313
313
  - '**/metadata.rb'
314
314
  - '**/Berksfile'
315
315
 
316
- ChefCorrectness/InvalidPlatformValueForPlatformFamilyHelper:
316
+ Chef/Correctness/InvalidPlatformValueForPlatformFamilyHelper:
317
317
  Description: Pass valid platforms families to the value_for_platform_family helper.
318
318
  StyleGuide: '#chefcorrectnessinvalidplatformvalueforplatformfamilyhelper'
319
319
  Enabled: true
@@ -322,7 +322,7 @@ ChefCorrectness/InvalidPlatformValueForPlatformFamilyHelper:
322
322
  - '**/metadata.rb'
323
323
  - '**/Berksfile'
324
324
 
325
- ChefCorrectness/InvalidPlatformValueForPlatformHelper:
325
+ Chef/Correctness/InvalidPlatformValueForPlatformHelper:
326
326
  Description: Pass valid platforms to the value_for_platform helper.
327
327
  StyleGuide: '#chefcorrectnessinvalidplatformvalueforplatformhelper'
328
328
  Enabled: true
@@ -331,7 +331,7 @@ ChefCorrectness/InvalidPlatformValueForPlatformHelper:
331
331
  - '**/metadata.rb'
332
332
  - '**/Berksfile'
333
333
 
334
- ChefCorrectness/InvalidNotificationTiming:
334
+ Chef/Correctness/InvalidNotificationTiming:
335
335
  Description: Valid notification timings are :immediately, :immediate (alias for :immediately), :delayed, and :before.
336
336
  StyleGuide: '#chefcorrectnessinvalidnotificationtiming'
337
337
  Enabled: true
@@ -341,7 +341,7 @@ ChefCorrectness/InvalidNotificationTiming:
341
341
  - '**/metadata.rb'
342
342
  - '**/Berksfile'
343
343
 
344
- ChefCorrectness/MalformedPlatformValueForPlatformHelper:
344
+ Chef/Correctness/MalformedPlatformValueForPlatformHelper:
345
345
  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'.
346
346
  StyleGuide: '#chefcorrectnessmalformedplatformvalueforplatformhelper'
347
347
  Enabled: true
@@ -350,7 +350,7 @@ ChefCorrectness/MalformedPlatformValueForPlatformHelper:
350
350
  - '**/metadata.rb'
351
351
  - '**/Berksfile'
352
352
 
353
- ChefCorrectness/DnfPackageAllowDowngrades:
353
+ Chef/Correctness/DnfPackageAllowDowngrades:
354
354
  Description: dnf_package does not support the allow_downgrades property
355
355
  StyleGuide: '#chefcorrectnessdnfpackageallowdowngrades'
356
356
  Enabled: true
@@ -360,7 +360,7 @@ ChefCorrectness/DnfPackageAllowDowngrades:
360
360
  - '**/metadata.rb'
361
361
  - '**/Berksfile'
362
362
 
363
- ChefCorrectness/ChefApplicationFatal:
363
+ Chef/Correctness/ChefApplicationFatal:
364
364
  Description: Use raise to force Chef Infra Client to fail instead of using Chef::Application.fatal
365
365
  StyleGuide: '#chefcorrectnesschefapplicationfatal'
366
366
  Enabled: true
@@ -369,7 +369,7 @@ ChefCorrectness/ChefApplicationFatal:
369
369
  - '**/metadata.rb'
370
370
  - '**/Berksfile'
371
371
 
372
- ChefCorrectness/PowershellScriptDeleteFile:
372
+ Chef/Correctness/PowershellScriptDeleteFile:
373
373
  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
374
374
  StyleGuide: '#chefcorrectnesspowershellscriptdeletefiles'
375
375
  Enabled: true
@@ -379,7 +379,7 @@ ChefCorrectness/PowershellScriptDeleteFile:
379
379
  - '**/metadata.rb'
380
380
  - '**/Berksfile'
381
381
 
382
- ChefCorrectness/ConditionalRubyShellout:
382
+ Chef/Correctness/ConditionalRubyShellout:
383
383
  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.
384
384
  StyleGuide: '#chefcorrectnessconditionalrubyshellout'
385
385
  Enabled: true
@@ -389,7 +389,7 @@ ChefCorrectness/ConditionalRubyShellout:
389
389
  - '**/metadata.rb'
390
390
  - '**/Berksfile'
391
391
 
392
- ChefCorrectness/LazyEvalNodeAttributeDefaults:
392
+ Chef/Correctness/LazyEvalNodeAttributeDefaults:
393
393
  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.
394
394
  StyleGuide: '#chefcorrectnesslazyevalnodeattributedefaults'
395
395
  Enabled: true
@@ -398,7 +398,7 @@ ChefCorrectness/LazyEvalNodeAttributeDefaults:
398
398
  - '**/libraries/*.rb'
399
399
  - '**/resources/*.rb'
400
400
 
401
- ChefCorrectness/OpenSSLPasswordHelpers:
401
+ Chef/Correctness/OpenSSLPasswordHelpers:
402
402
  Description: The secure_password helper from the openssl cookbooks Opscode::OpenSSL::Password class should not be used to generate passwords.
403
403
  StyleGuide: '#chefcorrectnessopensslpasswordhelpers'
404
404
  Enabled: true
@@ -407,7 +407,7 @@ ChefCorrectness/OpenSSLPasswordHelpers:
407
407
  - '**/metadata.rb'
408
408
  - '**/Berksfile'
409
409
 
410
- ChefCorrectness/InvalidPlatformFamilyInCase:
410
+ Chef/Correctness/InvalidPlatformFamilyInCase:
411
411
  Description: Use valid platform family values in case statements.
412
412
  StyleGuide: '#chefcorrectnessinvalidplatformfamilyincase'
413
413
  Enabled: true
@@ -416,7 +416,7 @@ ChefCorrectness/InvalidPlatformFamilyInCase:
416
416
  - '**/metadata.rb'
417
417
  - '**/Berksfile'
418
418
 
419
- ChefCorrectness/InvalidPlatformInCase:
419
+ Chef/Correctness/InvalidPlatformInCase:
420
420
  Description: Use valid platform values in case statements.
421
421
  StyleGuide: '#chefcorrectnessinvalidplatformincase'
422
422
  Enabled: true
@@ -425,7 +425,7 @@ ChefCorrectness/InvalidPlatformInCase:
425
425
  - '**/metadata.rb'
426
426
  - '**/Berksfile'
427
427
 
428
- ChefCorrectness/InvalidDefaultAction:
428
+ Chef/Correctness/InvalidDefaultAction:
429
429
  Description: Default actions in resources should be a symbol or an array of symbols.
430
430
  StyleGuide: '#chefcorrectnessinvaliddefaultaction'
431
431
  Enabled: true
@@ -434,7 +434,7 @@ ChefCorrectness/InvalidDefaultAction:
434
434
  - '**/libraries/*.rb'
435
435
  - '**/resources/*.rb'
436
436
 
437
- ChefCorrectness/SupportsMustBeFloat:
437
+ Chef/Correctness/SupportsMustBeFloat:
438
438
  Description: Versions used in metadata.rb supports calls should be floats not integers.
439
439
  StyleGuide: '#chefcorrectnesssupportsmustbefloat'
440
440
  Enabled: true
@@ -442,7 +442,7 @@ ChefCorrectness/SupportsMustBeFloat:
442
442
  Include:
443
443
  - '**/metadata.rb'
444
444
 
445
- ChefCorrectness/MacosUserdefaultsInvalidType:
445
+ Chef/Correctness/MacosUserdefaultsInvalidType:
446
446
  Description: The macos_userdefaults resource prior to Chef Infra Client 16.3 would silently continue if invalid types were passed resulting in unexpected behavior. Valid values are 'array', 'bool', 'dict', 'float', 'int', and 'string'.
447
447
  StyleGuide: '#chefcorrectnessmacosuserdefaultsinvalidtype'
448
448
  Enabled: true
@@ -451,7 +451,7 @@ ChefCorrectness/MacosUserdefaultsInvalidType:
451
451
  - '**/metadata.rb'
452
452
  - '**/Berksfile'
453
453
 
454
- ChefCorrectness/LazyInResourceGuard:
454
+ Chef/Correctness/LazyInResourceGuard:
455
455
  Description: Using `lazy {}` within a resource guard (not_if/only_if) will cause failures and is unnecessary as resource guards are always lazily evaluated.
456
456
  StyleGuide: '#chefcorrectnesslazyinresourceguard'
457
457
  Enabled: true
@@ -460,7 +460,7 @@ ChefCorrectness/LazyInResourceGuard:
460
460
  - '**/metadata.rb'
461
461
  - '**/Berksfile'
462
462
 
463
- ChefCorrectness/PropertyWithoutType:
463
+ Chef/Correctness/PropertyWithoutType:
464
464
  Description: Custom resource properties or attributes should always define a type to help users understand the correct allowed values.
465
465
  StyleGuide: '#chefcorrectnesspropertywithouttype'
466
466
  Enabled: true
@@ -469,14 +469,24 @@ ChefCorrectness/PropertyWithoutType:
469
469
  - '**/libraries/*.rb'
470
470
  - '**/resources/*.rb'
471
471
 
472
+ Chef/Correctness/OctalModeAsString:
473
+ Description: Don't represent file modes as strings containing octal values. Use standard base 10 file modes instead.
474
+ StyleGuide: '#chefcorrectnessoctalmodeasstring'
475
+ Enabled: true
476
+ VersionAdded: '6.21.0'
477
+ Exclude:
478
+ - '**/attributes/*.rb'
479
+ - '**/metadata.rb'
480
+ - '**/Berksfile'
481
+
472
482
  ###############################
473
- # ChefSharing: Issues that prevent sharing code with other teams or with the Chef community in general
483
+ # Chef/Sharing: Issues that prevent sharing code with other teams or with the Chef community in general
474
484
  ###############################
475
485
 
476
- ChefSharing:
486
+ Chef/Sharing:
477
487
  StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefsharing.md
478
488
 
479
- ChefSharing/InsecureCookbookURL:
489
+ Chef/Sharing/InsecureCookbookURL:
480
490
  Description: Insecure http Github or Gitlab URLs for metadata source_url/issues_url fields
481
491
  StyleGuide: '#chefsharinginsecurecookbookurl'
482
492
  Enabled: true
@@ -485,7 +495,7 @@ ChefSharing/InsecureCookbookURL:
485
495
  Include:
486
496
  - '**/metadata.rb'
487
497
 
488
- ChefSharing/InvalidLicenseString:
498
+ Chef/Sharing/InvalidLicenseString:
489
499
  Description: Cookbook metadata.rb does not use a SPDX compliant license string or "all rights reserved"
490
500
  StyleGuide: '#chefsharinginvalidlicensestring'
491
501
  Enabled: true
@@ -494,7 +504,7 @@ ChefSharing/InvalidLicenseString:
494
504
  Include:
495
505
  - '**/metadata.rb'
496
506
 
497
- ChefSharing/DefaultMetadataMaintainer:
507
+ Chef/Sharing/DefaultMetadataMaintainer:
498
508
  Description: Metadata contains default maintainer information from the cookbook generator. Add actual cookbook maintainer information to the metadata.rb.
499
509
  StyleGuide: '#chefsharingdefaultmetadatamaintainer'
500
510
  Enabled: true
@@ -503,7 +513,7 @@ ChefSharing/DefaultMetadataMaintainer:
503
513
  Include:
504
514
  - '**/metadata.rb'
505
515
 
506
- ChefSharing/EmptyMetadataField:
516
+ Chef/Sharing/EmptyMetadataField:
507
517
  Description: metadata.rb should not include fields with an empty string. Either don't include the field or add a value.
508
518
  StyleGuide: '#chefsharingemptymetadatafield'
509
519
  Enabled: true
@@ -512,7 +522,7 @@ ChefSharing/EmptyMetadataField:
512
522
  Include:
513
523
  - '**/metadata.rb'
514
524
 
515
- ChefSharing/IncludePropertyDescriptions:
525
+ Chef/Sharing/IncludePropertyDescriptions:
516
526
  Description: Properties should include description fields to allow automated documentation. Requires Chef Infra Client 13.9 or later.
517
527
  StyleGuide: '#chefsharingincludepropetydescriptions'
518
528
  Enabled: false
@@ -521,7 +531,7 @@ ChefSharing/IncludePropertyDescriptions:
521
531
  - '**/libraries/*.rb'
522
532
  - '**/resources/*.rb'
523
533
 
524
- ChefSharing/IncludeResourceDescriptions:
534
+ Chef/Sharing/IncludeResourceDescriptions:
525
535
  Description: Resources should include description fields to allow automated documentation. Requires Chef Infra Client 13.9 or later.
526
536
  StyleGuide: '#chefsharingincluderesourcedescriptions'
527
537
  Enabled: false
@@ -529,7 +539,7 @@ ChefSharing/IncludeResourceDescriptions:
529
539
  Include:
530
540
  - '**/resources/*.rb'
531
541
 
532
- ChefSharing/IncludeResourceExamples:
542
+ Chef/Sharing/IncludeResourceExamples:
533
543
  Description: Resources should include examples field to allow automated documentation. Requires Chef Infra Client 13.9 or later.
534
544
  StyleGuide: '#chefsharingincluderesourceexamples'
535
545
  Enabled: false
@@ -538,13 +548,13 @@ ChefSharing/IncludeResourceExamples:
538
548
  - '**/resources/*.rb'
539
549
 
540
550
  ###############################
541
- # ChefDeprecations: Resolving Deprecations that block upgrading Chef Infra Client
551
+ # Chef/Deprecations: Resolving Deprecations that block upgrading Chef Infra Client
542
552
  ###############################
543
553
 
544
- ChefDeprecations:
554
+ Chef/Deprecations:
545
555
  StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefdeprecations.md
546
556
 
547
- ChefDeprecations/NodeDeepFetch:
557
+ Chef/Deprecations/NodeDeepFetch:
548
558
  Description: Do not use the deprecated chef-sugar node.deep_fetch methods
549
559
  StyleGuide: '#chefdeprecationsnodedeepfetch'
550
560
  Enabled: true
@@ -553,7 +563,7 @@ ChefDeprecations/NodeDeepFetch:
553
563
  - '**/metadata.rb'
554
564
  - '**/Berksfile'
555
565
 
556
- ChefDeprecations/NodeSet:
566
+ Chef/Deprecations/NodeSet:
557
567
  Description: Do not use the deprecated node.set method
558
568
  StyleGuide: '#chefdeprecationsnodeset'
559
569
  Enabled: true
@@ -562,7 +572,7 @@ ChefDeprecations/NodeSet:
562
572
  - '**/metadata.rb'
563
573
  - '**/Berksfile'
564
574
 
565
- ChefDeprecations/NodeSetUnless:
575
+ Chef/Deprecations/NodeSetUnless:
566
576
  Description: Do not use the deprecated node.set_unless method
567
577
  StyleGuide: '#chefdeprecationsnodesetunless'
568
578
  Enabled: true
@@ -571,7 +581,7 @@ ChefDeprecations/NodeSetUnless:
571
581
  - '**/metadata.rb'
572
582
  - '**/Berksfile'
573
583
 
574
- ChefDeprecations/EpicFail:
584
+ Chef/Deprecations/EpicFail:
575
585
  Description: Use ignore_failure method instead of the deprecated epic_fail method
576
586
  StyleGuide: '#chefdeprecationsepicfail'
577
587
  Enabled: true
@@ -581,7 +591,7 @@ ChefDeprecations/EpicFail:
581
591
  - '**/metadata.rb'
582
592
  - '**/Berksfile'
583
593
 
584
- ChefDeprecations/CookbookDependsOnPoise:
594
+ Chef/Deprecations/CookbookDependsOnPoise:
585
595
  Description: Cookbooks should not depend on the deprecated Poise framework
586
596
  StyleGuide: '#chefdeprecationscookbookdependsonpoise'
587
597
  Enabled: true
@@ -589,7 +599,7 @@ ChefDeprecations/CookbookDependsOnPoise:
589
599
  Include:
590
600
  - '**/metadata.rb'
591
601
 
592
- ChefDeprecations/CookbookDependsOnCompatResource:
602
+ Chef/Deprecations/CookbookDependsOnCompatResource:
593
603
  Description: Don't depend on the deprecated compat_resource cookbook made obsolete by Chef Infra Client 12.19+
594
604
  StyleGuide: '#chefdeprecationscookbookdependsoncompatresource'
595
605
  Enabled: true
@@ -597,7 +607,7 @@ ChefDeprecations/CookbookDependsOnCompatResource:
597
607
  Include:
598
608
  - '**/metadata.rb'
599
609
 
600
- ChefDeprecations/CookbookDependsOnPartialSearch:
610
+ Chef/Deprecations/CookbookDependsOnPartialSearch:
601
611
  Description: Don't depend on the deprecated partial_search cookbook made obsolete by Chef Infra Client 13+
602
612
  StyleGuide: '#chefdeprecationscookbookdependsonpartialsearch'
603
613
  Enabled: true
@@ -605,7 +615,7 @@ ChefDeprecations/CookbookDependsOnPartialSearch:
605
615
  Include:
606
616
  - '**/metadata.rb'
607
617
 
608
- ChefDeprecations/EasyInstallResource:
618
+ Chef/Deprecations/EasyInstallResource:
609
619
  Description: Don't use the deprecated easy_install resource resource removed in Chef Infra Client 13
610
620
  StyleGuide: '#chefdeprecationseasyinstallresource'
611
621
  Enabled: true
@@ -615,7 +625,7 @@ ChefDeprecations/EasyInstallResource:
615
625
  - '**/metadata.rb'
616
626
  - '**/Berksfile'
617
627
 
618
- ChefDeprecations/ErlCallResource:
628
+ Chef/Deprecations/ErlCallResource:
619
629
  Description: Don't use the deprecated erl_call resource removed in Chef Infra Client 13
620
630
  StyleGuide: '#chefdeprecationserlcallresource'
621
631
  Enabled: true
@@ -625,7 +635,7 @@ ChefDeprecations/ErlCallResource:
625
635
  - '**/metadata.rb'
626
636
  - '**/Berksfile'
627
637
 
628
- ChefDeprecations/RequireRecipe:
638
+ Chef/Deprecations/RequireRecipe:
629
639
  Description: Use include_recipe instead of the require_recipe method
630
640
  StyleGuide: '#chefdeprecationsrequirerecipe'
631
641
  Enabled: true
@@ -635,7 +645,7 @@ ChefDeprecations/RequireRecipe:
635
645
  - '**/metadata.rb'
636
646
  - '**/Berksfile'
637
647
 
638
- ChefDeprecations/NodeMethodsInsteadofAttributes:
648
+ Chef/Deprecations/NodeMethodsInsteadofAttributes:
639
649
  Description: Use node attributes to access Ohai data instead of node methods, which were deprecated in Chef Infra Client 13.
640
650
  StyleGuide: '#chefdeprecationsnodemethodsinsteadofattributes'
641
651
  Enabled: true
@@ -644,7 +654,7 @@ ChefDeprecations/NodeMethodsInsteadofAttributes:
644
654
  - '**/metadata.rb'
645
655
  - '**/Berksfile'
646
656
 
647
- ChefDeprecations/UsesDeprecatedMixins:
657
+ Chef/Deprecations/UsesDeprecatedMixins:
648
658
  Description: Don't use deprecated Mixins no longer included in Chef Infra Client 14 and later.
649
659
  StyleGuide: '#chefdeprecationsusesdeprecatedmixins'
650
660
  Enabled: true
@@ -654,7 +664,7 @@ ChefDeprecations/UsesDeprecatedMixins:
654
664
  - '**/providers/*.rb'
655
665
  - '**/resources/*.rb'
656
666
 
657
- ChefDeprecations/IncludingXMLRubyRecipe:
667
+ Chef/Deprecations/IncludingXMLRubyRecipe:
658
668
  Description: The xml::ruby recipe installs nokogiri which is included in Chef Infra Client 12 and later.
659
669
  StyleGuide: '#chefdeprecationsincludingxmlrubyrecipe'
660
670
  Enabled: true
@@ -664,7 +674,7 @@ ChefDeprecations/IncludingXMLRubyRecipe:
664
674
  - '**/metadata.rb'
665
675
  - '**/Berksfile'
666
676
 
667
- ChefDeprecations/LegacyYumCookbookRecipes:
677
+ Chef/Deprecations/LegacyYumCookbookRecipes:
668
678
  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).
669
679
  StyleGuide: '#chefdeprecationslegacyyumcookbookrecipes'
670
680
  Enabled: true
@@ -672,7 +682,7 @@ ChefDeprecations/LegacyYumCookbookRecipes:
672
682
  Exclude:
673
683
  - '**/metadata.rb'
674
684
 
675
- ChefDeprecations/UsesChefRESTHelpers:
685
+ Chef/Deprecations/UsesChefRESTHelpers:
676
686
  Description: Don't use the helpers in Chef::REST which were removed in Chef Infra Client 13
677
687
  StyleGuide: '#chefdeprecationsuseschefresthelpers'
678
688
  Enabled: true
@@ -680,7 +690,7 @@ ChefDeprecations/UsesChefRESTHelpers:
680
690
  Exclude:
681
691
  - '**/metadata.rb'
682
692
 
683
- ChefDeprecations/ChocolateyPackageUninstallAction:
693
+ Chef/Deprecations/ChocolateyPackageUninstallAction:
684
694
  Description: Use the :remove action in the chocolatey_package resource instead of :uninstall which was removed in Chef Infra Client 14+
685
695
  StyleGuide: '#chefdeprecationschocolateypackageuninstallaction'
686
696
  Enabled: true
@@ -688,7 +698,7 @@ ChefDeprecations/ChocolateyPackageUninstallAction:
688
698
  Exclude:
689
699
  - '**/metadata.rb'
690
700
 
691
- ChefDeprecations/LaunchdDeprecatedHashProperty:
701
+ Chef/Deprecations/LaunchdDeprecatedHashProperty:
692
702
  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.
693
703
  StyleGuide: '#chefdeprecationslaunchddeprecatedhashproperty'
694
704
  Enabled: true
@@ -696,7 +706,7 @@ ChefDeprecations/LaunchdDeprecatedHashProperty:
696
706
  Exclude:
697
707
  - '**/metadata.rb'
698
708
 
699
- ChefDeprecations/LocaleDeprecatedLcAllProperty:
709
+ Chef/Deprecations/LocaleDeprecatedLcAllProperty:
700
710
  Description: The local resource's lc_all property has been deprecated and will be removed in Chef Infra Client 16
701
711
  StyleGuide: '#chefdeprecationslocaledeprecatedlcallproperty'
702
712
  Enabled: true
@@ -704,7 +714,7 @@ ChefDeprecations/LocaleDeprecatedLcAllProperty:
704
714
  Exclude:
705
715
  - '**/metadata.rb'
706
716
 
707
- ChefDeprecations/UserDeprecatedSupportsProperty:
717
+ Chef/Deprecations/UserDeprecatedSupportsProperty:
708
718
  Description: The supports property was removed in Chef Infra Client 13 in favor of individual 'manage_home' and 'non_unique' properties.
709
719
  StyleGuide: '#chefdeprecationsuserdeprecatedsupportsproperty'
710
720
  Enabled: true
@@ -712,7 +722,7 @@ ChefDeprecations/UserDeprecatedSupportsProperty:
712
722
  Exclude:
713
723
  - '**/metadata.rb'
714
724
 
715
- ChefDeprecations/UseInlineResourcesDefined:
725
+ Chef/Deprecations/UseInlineResourcesDefined:
716
726
  Description: use_inline_resources is now the default for resources in Chef Infra Client 13+ and does not need to be specified.
717
727
  StyleGuide: '#chefdeprecationsuseinlineresourcesdefined'
718
728
  Enabled: true
@@ -722,7 +732,7 @@ ChefDeprecations/UseInlineResourcesDefined:
722
732
  - '**/providers/*.rb'
723
733
  - '**/resources/*.rb'
724
734
 
725
- ChefDeprecations/IncludingYumDNFCompatRecipe:
735
+ Chef/Deprecations/IncludingYumDNFCompatRecipe:
726
736
  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.
727
737
  StyleGuide: '#chefdeprecationsincludingyumdnfcompatrecipe'
728
738
  Enabled: true
@@ -730,7 +740,7 @@ ChefDeprecations/IncludingYumDNFCompatRecipe:
730
740
  Exclude:
731
741
  - '**/metadata.rb'
732
742
 
733
- ChefDeprecations/WindowsTaskChangeAction:
743
+ Chef/Deprecations/WindowsTaskChangeAction:
734
744
  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.
735
745
  StyleGuide: '#chefdeprecationswindowstaskchangeaction'
736
746
  Enabled: true
@@ -738,7 +748,7 @@ ChefDeprecations/WindowsTaskChangeAction:
738
748
  Exclude:
739
749
  - '**/metadata.rb'
740
750
 
741
- ChefDeprecations/ResourceOverridesProvidesMethod:
751
+ Chef/Deprecations/ResourceOverridesProvidesMethod:
742
752
  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.
743
753
  StyleGuide: '#chefdeprecationsresourceoverridesprovidesmethod'
744
754
  Enabled: true
@@ -748,7 +758,7 @@ ChefDeprecations/ResourceOverridesProvidesMethod:
748
758
  - '**/providers/*.rb'
749
759
  - '**/resources/*.rb'
750
760
 
751
- ChefDeprecations/ResourceUsesDslNameMethod:
761
+ Chef/Deprecations/ResourceUsesDslNameMethod:
752
762
  Description: Use resource_name instead of the dsl_name method in resources. This will cause failures in Chef Infra Client 13 and later.
753
763
  StyleGuide: '#chefdeprecationsresourceusesdslnamemethod'
754
764
  Enabled: true
@@ -758,7 +768,7 @@ ChefDeprecations/ResourceUsesDslNameMethod:
758
768
  - '**/providers/*.rb'
759
769
  - '**/resources/*.rb'
760
770
 
761
- ChefDeprecations/ResourceUsesUpdatedMethod:
771
+ Chef/Deprecations/ResourceUsesUpdatedMethod:
762
772
  Description: Don't use updated = true/false to update resource state. This will cause failures in Chef Infra Client 13 and later.
763
773
  StyleGuide: '#chefdeprecationsresourceusesupdatedmethod'
764
774
  Enabled: false # has a high potential for false positives
@@ -768,7 +778,7 @@ ChefDeprecations/ResourceUsesUpdatedMethod:
768
778
  - '**/providers/*.rb'
769
779
  - '**/resources/*.rb'
770
780
 
771
- ChefDeprecations/NamePropertyWithDefaultValue:
781
+ Chef/Deprecations/NamePropertyWithDefaultValue:
772
782
  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.
773
783
  StyleGuide: '#chefdeprecationsnamepropertywithdefaultvalue'
774
784
  Enabled: true
@@ -777,7 +787,7 @@ ChefDeprecations/NamePropertyWithDefaultValue:
777
787
  - '**/libraries/*.rb'
778
788
  - '**/resources/*.rb'
779
789
 
780
- ChefDeprecations/ResourceUsesProviderBaseMethod:
790
+ Chef/Deprecations/ResourceUsesProviderBaseMethod:
781
791
  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.
782
792
  StyleGuide: '#chefdeprecationsresourceusesproviderbasemethod'
783
793
  Enabled: true
@@ -786,7 +796,7 @@ ChefDeprecations/ResourceUsesProviderBaseMethod:
786
796
  - '**/libraries/*.rb'
787
797
  - '**/resources/*.rb'
788
798
 
789
- ChefDeprecations/ChefSpecCoverageReport:
799
+ Chef/Deprecations/ChefSpecCoverageReport:
790
800
  Description: Don't use the deprecated ChefSpec coverage report functionality in your specs.
791
801
  StyleGuide: '#chefdeprecationschefspeccoveragereport'
792
802
  Enabled: true
@@ -794,7 +804,7 @@ ChefDeprecations/ChefSpecCoverageReport:
794
804
  Include:
795
805
  - '**/spec/*.rb'
796
806
 
797
- ChefDeprecations/ChefSpecLegacyRunner:
807
+ Chef/Deprecations/ChefSpecLegacyRunner:
798
808
  Description: Use ChefSpec::SoloRunner or ChefSpec::ServerRunner instead of the deprecated ChefSpec::Runner.
799
809
  StyleGuide: '#chefdeprecationschefspeclegacyrunner'
800
810
  Enabled: true
@@ -802,7 +812,7 @@ ChefDeprecations/ChefSpecLegacyRunner:
802
812
  Include:
803
813
  - '**/spec/*.rb'
804
814
 
805
- ChefDeprecations/UsesRunCommandHelper:
815
+ Chef/Deprecations/UsesRunCommandHelper:
806
816
  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.
807
817
  StyleGuide: '#chefdeprecationsusesruncommandhelper'
808
818
  Enabled: true
@@ -811,7 +821,7 @@ ChefDeprecations/UsesRunCommandHelper:
811
821
  - '**/metadata.rb'
812
822
  - 'Rakefile'
813
823
 
814
- ChefDeprecations/ChefHandlerUsesSupports:
824
+ Chef/Deprecations/ChefHandlerUsesSupports:
815
825
  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.
816
826
  StyleGuide: '#chefdeprecationschefhandlerusessupports'
817
827
  Enabled: true
@@ -819,7 +829,7 @@ ChefDeprecations/ChefHandlerUsesSupports:
819
829
  Exclude:
820
830
  - '**/metadata.rb'
821
831
 
822
- ChefDeprecations/DeprecatedYumRepositoryProperties:
832
+ Chef/Deprecations/DeprecatedYumRepositoryProperties:
823
833
  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.
824
834
  StyleGuide: '#chefdeprecationsdeprecatedyumrepositoryproperties'
825
835
  Enabled: true
@@ -827,7 +837,7 @@ ChefDeprecations/DeprecatedYumRepositoryProperties:
827
837
  Exclude:
828
838
  - '**/metadata.rb'
829
839
 
830
- ChefDeprecations/EOLAuditModeUsage:
840
+ Chef/Deprecations/EOLAuditModeUsage:
831
841
  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.
832
842
  StyleGuide: '#chefdeprecationseolauditmodeusage'
833
843
  Enabled: true
@@ -835,7 +845,7 @@ ChefDeprecations/EOLAuditModeUsage:
835
845
  Exclude:
836
846
  - '**/metadata.rb'
837
847
 
838
- ChefDeprecations/ResourceInheritsFromCompatResource:
848
+ Chef/Deprecations/ResourceInheritsFromCompatResource:
839
849
  Description: HWRP style resource should inherit from the 'Chef::Resource' class and not the 'ChefCompat::Resource' class from the deprecated compat_resource cookbook.
840
850
  StyleGuide: '#chefdeprecationsresourceinheritsfromcompatresource'
841
851
  Enabled: true
@@ -843,7 +853,7 @@ ChefDeprecations/ResourceInheritsFromCompatResource:
843
853
  Include:
844
854
  - '**/libraries/*.rb'
845
855
 
846
- ChefDeprecations/VerifyPropertyUsesFileExpansion:
856
+ Chef/Deprecations/VerifyPropertyUsesFileExpansion:
847
857
  Description: Use the 'path' variable in the verify property and not the 'file' variable which was removed in Chef Infra Client 13.
848
858
  StyleGuide: '#chefdeprecationsverifypropertyusesfileexpansion'
849
859
  Enabled: true
@@ -851,13 +861,13 @@ ChefDeprecations/VerifyPropertyUsesFileExpansion:
851
861
  Exclude:
852
862
  - '**/metadata.rb'
853
863
 
854
- ChefDeprecations/PoiseArchiveUsage:
864
+ Chef/Deprecations/PoiseArchiveUsage:
855
865
  Description: The poise_archive resource in the deprecated poise-archive should be replaced with the archive_file resource found in Chef Infra Client 15+.
856
866
  StyleGuide: '#chefdeprecationspoisearchiveusage'
857
867
  Enabled: true
858
868
  VersionAdded: '5.11.0'
859
869
 
860
- ChefDeprecations/PartialSearchHelperUsage:
870
+ Chef/Deprecations/PartialSearchHelperUsage:
861
871
  Description: Legacy partial_search usage should be updated to use :filter_result in the search helper instead.
862
872
  StyleGuide: '#chefdeprecationspartialsearchhelperusage'
863
873
  Enabled: true
@@ -865,7 +875,7 @@ ChefDeprecations/PartialSearchHelperUsage:
865
875
  Exclude:
866
876
  - '**/metadata.rb'
867
877
 
868
- ChefDeprecations/SearchUsesPositionalParameters:
878
+ Chef/Deprecations/SearchUsesPositionalParameters:
869
879
  Description: Don't use deprecated positional parameters in cookbook search queries.
870
880
  StyleGuide: '#chefdeprecationssearchusespositionalparameters'
871
881
  Enabled: true
@@ -873,7 +883,7 @@ ChefDeprecations/SearchUsesPositionalParameters:
873
883
  Exclude:
874
884
  - '**/metadata.rb'
875
885
 
876
- ChefDeprecations/PartialSearchClassUsage:
886
+ Chef/Deprecations/PartialSearchClassUsage:
877
887
  Description: Legacy Chef::PartialSearch class usage should be updated to use the search helper instead with the filter_result key.
878
888
  StyleGuide: '#chefdeprecationspartialsearchclassusage'
879
889
  Enabled: true
@@ -881,7 +891,7 @@ ChefDeprecations/PartialSearchClassUsage:
881
891
  Exclude:
882
892
  - '**/metadata.rb'
883
893
 
884
- ChefDeprecations/Cheffile:
894
+ Chef/Deprecations/Cheffile:
885
895
  Description: The Libarian-Chef depsolving project is no longer maintained and should not be used for cookbook depsolving. Consider using Policyfiles instead.
886
896
  StyleGuide: '#chefdeprecationscheffile'
887
897
  Enabled: true
@@ -889,7 +899,7 @@ ChefDeprecations/Cheffile:
889
899
  Include:
890
900
  - '**/Cheffile'
891
901
 
892
- ChefDeprecations/LegacyNotifySyntax:
902
+ Chef/Deprecations/LegacyNotifySyntax:
893
903
  Description: Use the new-style notification syntax which allows you to notify resources defined later in a recipe or resource.
894
904
  StyleGuide: '#chefdeprecationslegacynotifysyntax'
895
905
  Enabled: true
@@ -897,7 +907,7 @@ ChefDeprecations/LegacyNotifySyntax:
897
907
  Exclude:
898
908
  - '**/metadata.rb'
899
909
 
900
- ChefDeprecations/NodeSetWithoutLevel:
910
+ Chef/Deprecations/NodeSetWithoutLevel:
901
911
  Description: When setting a node attribute in Chef Infra Client 11 and later you must specify the precedence level.
902
912
  StyleGuide: '#chefdeprecationsnodesetwithoutlevel'
903
913
  Enabled: true
@@ -906,7 +916,7 @@ ChefDeprecations/NodeSetWithoutLevel:
906
916
  - '**/metadata.rb'
907
917
  - '**/attributes/*.rb'
908
918
 
909
- ChefDeprecations/ChefRewind:
919
+ Chef/Deprecations/ChefRewind:
910
920
  Description: Use delete_resource / edit_resource instead of functionality in the deprecated chef-rewind gem
911
921
  StyleGuide: '#chefdeprecationschefrewind'
912
922
  Enabled: true
@@ -915,7 +925,7 @@ ChefDeprecations/ChefRewind:
915
925
  - '**/metadata.rb'
916
926
  - '**/attributes/*.rb'
917
927
 
918
- ChefDeprecations/RubyBlockCreateAction:
928
+ Chef/Deprecations/RubyBlockCreateAction:
919
929
  Description: Use the :run action in the ruby_block resource instead of the deprecated :create action
920
930
  StyleGuide: '#chefdeprecationsrubyblockcreateaction'
921
931
  Enabled: true
@@ -925,7 +935,7 @@ ChefDeprecations/RubyBlockCreateAction:
925
935
  - '**/attributes/*.rb'
926
936
  - '**/Berksfile'
927
937
 
928
- ChefDeprecations/DeprecatedPlatformMethods:
938
+ Chef/Deprecations/DeprecatedPlatformMethods:
929
939
  Description: Use provider_for_action or provides instead of the deprecated Chef::Platform methods in resources.
930
940
  StyleGuide: '#chefdeprecationsdeprecatedplatformmethods'
931
941
  Enabled: true
@@ -936,7 +946,7 @@ ChefDeprecations/DeprecatedPlatformMethods:
936
946
  - '**/resources/*.rb'
937
947
  - '**/providers/*.rb'
938
948
 
939
- ChefDeprecations/DeprecatedChefSpecPlatform:
949
+ Chef/Deprecations/DeprecatedChefSpecPlatform:
940
950
  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
941
951
  StyleGuide: '#chefdeprecationsdeprecatedchefspecplatform'
942
952
  Enabled: true
@@ -944,7 +954,7 @@ ChefDeprecations/DeprecatedChefSpecPlatform:
944
954
  Include:
945
955
  - '**/spec/**/*.rb'
946
956
 
947
- ChefDeprecations/WindowsFeatureServermanagercmd:
957
+ Chef/Deprecations/WindowsFeatureServermanagercmd:
948
958
  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.
949
959
  StyleGuide: '#chefdeprecationswindowsfeatureservermanagercmd'
950
960
  Enabled: true
@@ -954,7 +964,7 @@ ChefDeprecations/WindowsFeatureServermanagercmd:
954
964
  - '**/attributes/*.rb'
955
965
  - '**/Berksfile'
956
966
 
957
- ChefDeprecations/DeprecatedWindowsVersionCheck:
967
+ Chef/Deprecations/DeprecatedWindowsVersionCheck:
958
968
  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.
959
969
  StyleGuide: '#chefdeprecationsdeprecatedwindowsversioncheck'
960
970
  Enabled: true
@@ -963,7 +973,7 @@ ChefDeprecations/DeprecatedWindowsVersionCheck:
963
973
  - '**/metadata.rb'
964
974
  - '**/Berksfile'
965
975
 
966
- ChefDeprecations/ChefWindowsPlatformHelper:
976
+ Chef/Deprecations/ChefWindowsPlatformHelper:
967
977
  Description: Use `platform?('windows')` instead of the legacy `Chef::Platform.windows?` helper.
968
978
  StyleGuide: '#chefdeprecationschefwindowsplatformhelper'
969
979
  Enabled: true
@@ -972,7 +982,7 @@ ChefDeprecations/ChefWindowsPlatformHelper:
972
982
  - '**/metadata.rb'
973
983
  - '**/Berksfile'
974
984
 
975
- ChefDeprecations/LogResourceNotifications:
985
+ Chef/Deprecations/LogResourceNotifications:
976
986
  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.
977
987
  StyleGuide: '#chefdeprecationslogresourcenotifications'
978
988
  Enabled: true
@@ -981,7 +991,7 @@ ChefDeprecations/LogResourceNotifications:
981
991
  - '**/metadata.rb'
982
992
  - '**/Berksfile'
983
993
 
984
- ChefDeprecations/HWRPWithoutProvides:
994
+ Chef/Deprecations/HWRPWithoutProvides:
985
995
  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`.
986
996
  StyleGuide: '#chefdeprecationsresourcewithoutnameorprovides'
987
997
  Enabled: true
@@ -990,7 +1000,7 @@ ChefDeprecations/HWRPWithoutProvides:
990
1000
  Include:
991
1001
  - '**/libraries/*.rb'
992
1002
 
993
- ChefDeprecations/WindowsVersionHelpers:
1003
+ Chef/Deprecations/WindowsVersionHelpers:
994
1004
  Description: Use node['platform_version'] data instead of the Windows::VersionHelper helper from the Windows cookbook.
995
1005
  StyleGuide: '#chefdeprecationswindowsversionhelpers'
996
1006
  Enabled: true
@@ -999,7 +1009,7 @@ ChefDeprecations/WindowsVersionHelpers:
999
1009
  - '**/metadata.rb'
1000
1010
  - '**/Berksfile'
1001
1011
 
1002
- ChefDeprecations/PowershellCookbookHelpers:
1012
+ Chef/Deprecations/PowershellCookbookHelpers:
1003
1013
  Description: Use node['powershell']['version'] or the new powershell_version helper available in Chef Infra Client 16+ instead of the deprecated PowerShell cookbook helpers.
1004
1014
  StyleGuide: '#chefdeprecationspowershellcookbookhelpers'
1005
1015
  Enabled: true
@@ -1008,7 +1018,7 @@ ChefDeprecations/PowershellCookbookHelpers:
1008
1018
  - '**/metadata.rb'
1009
1019
  - '**/Berksfile'
1010
1020
 
1011
- ChefDeprecations/DeprecatedShelloutMethods:
1021
+ Chef/Deprecations/DeprecatedShelloutMethods:
1012
1022
  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.
1013
1023
  StyleGuide: '#chefdeprecationsdeprecatedshelloutmethods'
1014
1024
  Enabled: true
@@ -1018,7 +1028,7 @@ ChefDeprecations/DeprecatedShelloutMethods:
1018
1028
  - '**/attributes/*.rb'
1019
1029
  - '**/Berksfile'
1020
1030
 
1021
- ChefDeprecations/Ruby27KeywordArgumentWarnings:
1031
+ Chef/Deprecations/Ruby27KeywordArgumentWarnings:
1022
1032
  Description: Pass options to shell_out helpers without the brackets to avoid Ruby 2.7 deprecation warnings.
1023
1033
  StyleGuide: '#chefdeprecationsruby27keywordargumentwarnings'
1024
1034
  Enabled: true
@@ -1027,7 +1037,7 @@ ChefDeprecations/Ruby27KeywordArgumentWarnings:
1027
1037
  - '**/metadata.rb'
1028
1038
  - '**/Berksfile'
1029
1039
 
1030
- ChefDeprecations/ResourceUsesOnlyResourceName:
1040
+ Chef/Deprecations/ResourceUsesOnlyResourceName:
1031
1041
  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.
1032
1042
  StyleGuide: '#chefdeprecationsresourceusesonlyresourcename'
1033
1043
  Enabled: true
@@ -1036,7 +1046,7 @@ ChefDeprecations/ResourceUsesOnlyResourceName:
1036
1046
  - '**/libraries/*.rb'
1037
1047
  - '**/resources/*.rb'
1038
1048
 
1039
- ChefDeprecations/ChefDKGenerators:
1049
+ Chef/Deprecations/ChefDKGenerators:
1040
1050
  Description: Chef Workstation 0.8 and later renamed the ChefDK module used when writing custom cookbook generators from ChefDK to ChefCLI. For compatibility with the latest Chef Workstation releases you'll need to reference the new class names.
1041
1051
  StyleGuide: '#chefdeprecationschefdkgenerators'
1042
1052
  Enabled: true
@@ -1045,7 +1055,7 @@ ChefDeprecations/ChefDKGenerators:
1045
1055
  - '**/metadata.rb'
1046
1056
  - '**/Berksfile'
1047
1057
 
1048
- ChefDeprecations/ChefHandlerRecipe:
1058
+ Chef/Deprecations/ChefHandlerRecipe:
1049
1059
  Description: There is no need to include the empty and deprecated chef_handler::default recipe in order to use the chef_handler resource.
1050
1060
  StyleGuide: '#chefdeprecationschefhandlerrecipe'
1051
1061
  Enabled: true
@@ -1054,7 +1064,7 @@ ChefDeprecations/ChefHandlerRecipe:
1054
1064
  - '**/metadata.rb'
1055
1065
  - '**/Berksfile'
1056
1066
 
1057
- ChefDeprecations/UseAutomaticResourceName:
1067
+ Chef/Deprecations/UseAutomaticResourceName:
1058
1068
  Description: The use_automatic_resource_name method was removed in Chef Infra Client 16. The resource name/provides should be set explicitly instead.
1059
1069
  StyleGuide: '#chefdeprecationsuseautomaticresourcename'
1060
1070
  Enabled: true
@@ -1063,7 +1073,7 @@ ChefDeprecations/UseAutomaticResourceName:
1063
1073
  - '**/libraries/*.rb'
1064
1074
  - '**/resources/*.rb'
1065
1075
 
1066
- ChefDeprecations/MacosUserdefaultsGlobalProperty:
1076
+ Chef/Deprecations/MacosUserdefaultsGlobalProperty:
1067
1077
  Description: The `global` property in the macos_userdefaults resource was deprecated in Chef Infra Client 16.3. Omitting the `domain` property will now set global defaults.
1068
1078
  StyleGuide: '#chefdeprecationsmacosuserdefaultsglobalproperty'
1069
1079
  Enabled: true
@@ -1072,7 +1082,7 @@ ChefDeprecations/MacosUserdefaultsGlobalProperty:
1072
1082
  - '**/metadata.rb'
1073
1083
  - '**/Berksfile'
1074
1084
 
1075
- ChefDeprecations/CookbooksDependsOnSelf:
1085
+ Chef/Deprecations/CookbooksDependsOnSelf:
1076
1086
  Description: A cookbook cannot depend on itself in Chef Infra Client 13 or later.
1077
1087
  StyleGuide: '#chefdeprecationscookbooksdependonself'
1078
1088
  Enabled: true
@@ -1081,7 +1091,7 @@ ChefDeprecations/CookbooksDependsOnSelf:
1081
1091
  Include:
1082
1092
  - '**/metadata.rb'
1083
1093
 
1084
- ChefDeprecations/ChefShellout:
1094
+ Chef/Deprecations/ChefShellout:
1085
1095
  Description: Don't use deprecated Chef::ShellOut which was removed in Chef Infra Client 13. Use Mixlib::ShellOut instead, which behaves identically.
1086
1096
  StyleGuide: '#chefdeprecationschefshellout'
1087
1097
  Enabled: true
@@ -1091,7 +1101,7 @@ ChefDeprecations/ChefShellout:
1091
1101
  - '**/attributes/*.rb'
1092
1102
  - '**/Berksfile'
1093
1103
 
1094
- ChefDeprecations/ExecutePathProperty:
1104
+ Chef/Deprecations/ExecutePathProperty:
1095
1105
  Description: In Chef Infra Client 13 and later you must set path env vars in `execute` resources using the `environment` property not the legacy `path` property.
1096
1106
  StyleGuide: '#chefdeprecationsexecutepathproperty'
1097
1107
  Enabled: true
@@ -1101,7 +1111,7 @@ ChefDeprecations/ExecutePathProperty:
1101
1111
  - '**/attributes/*.rb'
1102
1112
  - '**/Berksfile'
1103
1113
 
1104
- ChefDeprecations/ExecuteRelativeCreatesWithoutCwd:
1114
+ Chef/Deprecations/ExecuteRelativeCreatesWithoutCwd:
1105
1115
  Description: In Chef Infra Client 13 and later you must either specify an absolute path when using the `execute` resource's `creates` property or also use the `cwd` property.
1106
1116
  StyleGuide: '#chefdeprecationsexecuterelativecreateswithoutcwd'
1107
1117
  Enabled: true
@@ -1111,7 +1121,7 @@ ChefDeprecations/ExecuteRelativeCreatesWithoutCwd:
1111
1121
  - '**/attributes/*.rb'
1112
1122
  - '**/Berksfile'
1113
1123
 
1114
- ChefDeprecations/WindowsPackageInstallerTypeString:
1124
+ Chef/Deprecations/WindowsPackageInstallerTypeString:
1115
1125
  Description: In Chef Infra Client 13 and later the `windows_package` resource's `installer_type` property must be a symbol.
1116
1126
  StyleGuide: '#chefdeprecationswindowspackageinstallertypestring'
1117
1127
  Enabled: true
@@ -1121,14 +1131,20 @@ ChefDeprecations/WindowsPackageInstallerTypeString:
1121
1131
  - '**/attributes/*.rb'
1122
1132
  - '**/Berksfile'
1123
1133
 
1134
+ Chef/Deprecations/UseYamlDump:
1135
+ Description: Chef Infra Client 16.5 introduced performance enhancements to Ruby library loading. Due to the underlying implementation of Ruby's `.to_yaml` method, it does not automatically load the `yaml` library and `YAML.dump()` should be used instead to properly load the `yaml` library.
1136
+ StyleGuide: '#chefdeprecationsuseyamldump'
1137
+ Enabled: true
1138
+ VersionAdded: '6.21.0'
1139
+
1124
1140
  ###############################
1125
- # ChefModernize: Cleaning up legacy code and using new built-in resources
1141
+ # Chef/Modernize: Cleaning up legacy code and using new built-in resources
1126
1142
  ###############################
1127
1143
 
1128
- ChefModernize:
1144
+ Chef/Modernize:
1129
1145
  StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefmodernize.md
1130
1146
 
1131
- ChefModernize/LegacyBerksfileSource:
1147
+ Chef/Modernize/LegacyBerksfileSource:
1132
1148
  Description: Do not use legacy Berksfile community sources. Use Chef Supermarket instead.
1133
1149
  StyleGuide: '#chefmodernizelegacyberksfilesource'
1134
1150
  Enabled: true
@@ -1136,7 +1152,7 @@ ChefModernize/LegacyBerksfileSource:
1136
1152
  Include:
1137
1153
  - '**/Berksfile'
1138
1154
 
1139
- ChefModernize/WhyRunSupportedTrue:
1155
+ Chef/Modernize/WhyRunSupportedTrue:
1140
1156
  Description: whyrun_supported? no longer needs to be set to true as it is the default in Chef 13+
1141
1157
  StyleGuide: '#chefmodernizewhyrunsupportedtrue'
1142
1158
  Enabled: true
@@ -1146,7 +1162,7 @@ ChefModernize/WhyRunSupportedTrue:
1146
1162
  - '**/providers/*.rb'
1147
1163
  - '**/libraries/*.rb'
1148
1164
 
1149
- ChefModernize/UnnecessaryDependsChef14:
1165
+ Chef/Modernize/UnnecessaryDependsChef14:
1150
1166
  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.
1151
1167
  StyleGuide: '#chefmodernizeunnecessarydependschef14'
1152
1168
  Enabled: true
@@ -1154,7 +1170,7 @@ ChefModernize/UnnecessaryDependsChef14:
1154
1170
  Include:
1155
1171
  - '**/metadata.rb'
1156
1172
 
1157
- ChefModernize/RespondToInMetadata:
1173
+ Chef/Modernize/RespondToInMetadata:
1158
1174
  Description: It is no longer necessary to use respond_to? in metadata.rb in Chef Infra Client 12.15 and later
1159
1175
  StyleGuide: '#chefmodernizerespondtoinmetadata'
1160
1176
  Enabled: true
@@ -1162,7 +1178,7 @@ ChefModernize/RespondToInMetadata:
1162
1178
  Include:
1163
1179
  - '**/metadata.rb'
1164
1180
 
1165
- ChefModernize/RespondToResourceName:
1181
+ Chef/Modernize/RespondToResourceName:
1166
1182
  Description: respond_to?(:resource_name) in resources is no longer necessary in Chef Infra Client 12.5+
1167
1183
  StyleGuide: '#chefmodernizerespondtoresourcename'
1168
1184
  Enabled: true
@@ -1171,7 +1187,7 @@ ChefModernize/RespondToResourceName:
1171
1187
  - '**/resources/*.rb'
1172
1188
  - '**/libraries/*.rb'
1173
1189
 
1174
- ChefModernize/RespondToProvides:
1190
+ Chef/Modernize/RespondToProvides:
1175
1191
  Description: respond_to?(:provides) in resources is no longer necessary in Chef Infra Client 12+
1176
1192
  StyleGuide: '#chefmodernizerespondtoprovides'
1177
1193
  Enabled: true
@@ -1180,7 +1196,7 @@ ChefModernize/RespondToProvides:
1180
1196
  - '**/providers/*.rb'
1181
1197
  - '**/libraries/*.rb'
1182
1198
 
1183
- ChefModernize/SetOrReturnInResources:
1199
+ Chef/Modernize/SetOrReturnInResources:
1184
1200
  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.
1185
1201
  StyleGuide: '#chefmodernizesetorreturninresources'
1186
1202
  Enabled: true
@@ -1189,7 +1205,7 @@ ChefModernize/SetOrReturnInResources:
1189
1205
  - '**/resources/*.rb'
1190
1206
  - '**/libraries/*.rb'
1191
1207
 
1192
- ChefModernize/CustomResourceWithAttributes:
1208
+ Chef/Modernize/CustomResourceWithAttributes:
1193
1209
  Description: Custom Resources should contain properties not attributes.
1194
1210
  StyleGuide: '#chefmodernizecustomresourcewithattributes'
1195
1211
  Enabled: true
@@ -1197,7 +1213,7 @@ ChefModernize/CustomResourceWithAttributes:
1197
1213
  Include:
1198
1214
  - '**/resources/*.rb'
1199
1215
 
1200
- ChefModernize/IncludingAptDefaultRecipe:
1216
+ Chef/Modernize/IncludingAptDefaultRecipe:
1201
1217
  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.
1202
1218
  StyleGuide: '#chefmodernizeincludingaptdefaultrecipe'
1203
1219
  Enabled: true
@@ -1205,7 +1221,7 @@ ChefModernize/IncludingAptDefaultRecipe:
1205
1221
  Exclude:
1206
1222
  - '**/metadata.rb'
1207
1223
 
1208
- ChefModernize/IncludingWindowsDefaultRecipe:
1224
+ Chef/Modernize/IncludingWindowsDefaultRecipe:
1209
1225
  Description: Do not include the Windows default recipe, which only installs win32 gems already included in Chef Infra Client
1210
1226
  StyleGuide: '#chefmodernizeincludingwindowsdefaultrecipe'
1211
1227
  Enabled: true
@@ -1213,7 +1229,7 @@ ChefModernize/IncludingWindowsDefaultRecipe:
1213
1229
  Exclude:
1214
1230
  - '**/metadata.rb'
1215
1231
 
1216
- ChefModernize/DefinesChefSpecMatchers:
1232
+ Chef/Modernize/DefinesChefSpecMatchers:
1217
1233
  Description: ChefSpec matchers are now auto generated by ChefSpec 7.1+ and do not need to be defined in a cookbook
1218
1234
  StyleGuide: '#chefmodernizedefineschefspecmatchers'
1219
1235
  Enabled: true
@@ -1221,7 +1237,7 @@ ChefModernize/DefinesChefSpecMatchers:
1221
1237
  Include:
1222
1238
  - '**/libraries/*.rb'
1223
1239
 
1224
- ChefModernize/ExecuteAptUpdate:
1240
+ Chef/Modernize/ExecuteAptUpdate:
1225
1241
  Description: Use the apt_update resource instead of the execute resource to run an apt-get update package cache update
1226
1242
  StyleGuide: '#chefmodernizeexecuteaptupdate'
1227
1243
  Enabled: true
@@ -1229,7 +1245,7 @@ ChefModernize/ExecuteAptUpdate:
1229
1245
  Exclude:
1230
1246
  - '**/metadata.rb'
1231
1247
 
1232
- ChefModernize/MinitestHandlerUsage:
1248
+ Chef/Modernize/MinitestHandlerUsage:
1233
1249
  Description: Use Chef InSpec for testing instead of the Minitest Handler cookbook pattern.
1234
1250
  StyleGuide: '#chefmodernizeminitesthandlerusage'
1235
1251
  Enabled: true
@@ -1237,7 +1253,7 @@ ChefModernize/MinitestHandlerUsage:
1237
1253
  Include:
1238
1254
  - '**/metadata.rb'
1239
1255
 
1240
- ChefModernize/IncludingMixinShelloutInResources:
1256
+ Chef/Modernize/IncludingMixinShelloutInResources:
1241
1257
  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+.
1242
1258
  StyleGuide: '#chefmodernizeincludingmixinshelloutinresources'
1243
1259
  Enabled: true
@@ -1247,7 +1263,7 @@ ChefModernize/IncludingMixinShelloutInResources:
1247
1263
  - '**/providers/*.rb'
1248
1264
  - '**/libraries/*.rb'
1249
1265
 
1250
- ChefModernize/UseBuildEssentialResource:
1266
+ Chef/Modernize/UseBuildEssentialResource:
1251
1267
  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+
1252
1268
  StyleGuide: '#chefmodernizeusebuildessentialresource'
1253
1269
  Enabled: true
@@ -1255,7 +1271,7 @@ ChefModernize/UseBuildEssentialResource:
1255
1271
  Exclude:
1256
1272
  - '**/metadata.rb'
1257
1273
 
1258
- ChefModernize/WindowsZipfileUsage:
1274
+ Chef/Modernize/WindowsZipfileUsage:
1259
1275
  Description: Use the archive_file resource built into Chef Infra Client 15+ instead of the windows_zipfile from the Windows cookbook
1260
1276
  StyleGuide: '#chefmodernizewindowszipfileusage'
1261
1277
  Enabled: true
@@ -1263,7 +1279,7 @@ ChefModernize/WindowsZipfileUsage:
1263
1279
  Exclude:
1264
1280
  - '**/metadata.rb'
1265
1281
 
1266
- ChefModernize/SevenZipArchiveResource:
1282
+ Chef/Modernize/SevenZipArchiveResource:
1267
1283
  Description: Use the archive_file resource built into Chef Infra Client 15+ instead of the seven_zip_archive
1268
1284
  StyleGuide: '#chefmodernizesevenziparchiveresource'
1269
1285
  Enabled: true
@@ -1271,7 +1287,7 @@ ChefModernize/SevenZipArchiveResource:
1271
1287
  Exclude:
1272
1288
  - '**/metadata.rb'
1273
1289
 
1274
- ChefModernize/LibarchiveFileResource:
1290
+ Chef/Modernize/LibarchiveFileResource:
1275
1291
  Description: Use the archive_file resource built into Chef Infra Client 15+ instead of the libarchive file resource
1276
1292
  StyleGuide: '#chefmodernizelibarchivefileresource'
1277
1293
  Enabled: true
@@ -1279,7 +1295,7 @@ ChefModernize/LibarchiveFileResource:
1279
1295
  Exclude:
1280
1296
  - '**/metadata.rb'
1281
1297
 
1282
- ChefModernize/PowershellScriptExpandArchive:
1298
+ Chef/Modernize/PowershellScriptExpandArchive:
1283
1299
  Description: Use the archive_file resource built into Chef Infra Client 15+ instead of using Expand-Archive in a powershell_script resource
1284
1300
  StyleGuide: '#chefmodernizepowershellscriptexpandarchive'
1285
1301
  Enabled: true
@@ -1287,7 +1303,7 @@ ChefModernize/PowershellScriptExpandArchive:
1287
1303
  Exclude:
1288
1304
  - '**/metadata.rb'
1289
1305
 
1290
- ChefModernize/PowershellInstallPackage:
1306
+ Chef/Modernize/PowershellInstallPackage:
1291
1307
  Description: Use the package resource built into Chef Infra Client instead of using Install-Package in a powershell_script resource
1292
1308
  StyleGuide: '#chefmodernizepowershellinstallpackage'
1293
1309
  Enabled: true
@@ -1295,7 +1311,7 @@ ChefModernize/PowershellInstallPackage:
1295
1311
  Exclude:
1296
1312
  - '**/metadata.rb'
1297
1313
 
1298
- ChefModernize/PowershellInstallWindowsFeature:
1314
+ Chef/Modernize/PowershellInstallWindowsFeature:
1299
1315
  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
1300
1316
  StyleGuide: '#chefmodernizepowershellinstallwindowsfeature'
1301
1317
  Enabled: true
@@ -1303,7 +1319,7 @@ ChefModernize/PowershellInstallWindowsFeature:
1303
1319
  Exclude:
1304
1320
  - '**/metadata.rb'
1305
1321
 
1306
- ChefModernize/ShellOutToChocolatey:
1322
+ Chef/Modernize/ShellOutToChocolatey:
1307
1323
  Description: Use the Chocolatey resources built into Chef Infra Client instead of shelling out to the choco command
1308
1324
  StyleGuide: '#chefmodernizeshellouttochocolatey'
1309
1325
  Enabled: true
@@ -1311,7 +1327,7 @@ ChefModernize/ShellOutToChocolatey:
1311
1327
  Exclude:
1312
1328
  - '**/metadata.rb'
1313
1329
 
1314
- ChefModernize/CronManageResource:
1330
+ Chef/Modernize/CronManageResource:
1315
1331
  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.
1316
1332
  StyleGuide: '#chefmodernizecronmanageresource'
1317
1333
  Enabled: true
@@ -1319,7 +1335,7 @@ ChefModernize/CronManageResource:
1319
1335
  Exclude:
1320
1336
  - '**/metadata.rb'
1321
1337
 
1322
- ChefModernize/UsesZypperRepo:
1338
+ Chef/Modernize/UsesZypperRepo:
1323
1339
  Description: The zypper_repo resource was renamed zypper_repository when it was added to Chef Infra Client 13.3.
1324
1340
  StyleGuide: '#chefmodernizeuseszypperrepo'
1325
1341
  Enabled: true
@@ -1327,7 +1343,7 @@ ChefModernize/UsesZypperRepo:
1327
1343
  Exclude:
1328
1344
  - '**/metadata.rb'
1329
1345
 
1330
- ChefModernize/DependsOnZypperCookbook:
1346
+ Chef/Modernize/DependsOnZypperCookbook:
1331
1347
  Description: Don't include the zypper cookbook as the zypper_repository resource is built into Chef Infra Client 13.3+
1332
1348
  StyleGuide: '#chefmodernizedependsonzyppercookbook'
1333
1349
  Enabled: true
@@ -1335,7 +1351,7 @@ ChefModernize/DependsOnZypperCookbook:
1335
1351
  Exclude:
1336
1352
  - '**/metadata.rb'
1337
1353
 
1338
- ChefModernize/ExecuteTzUtil:
1354
+ Chef/Modernize/ExecuteTzUtil:
1339
1355
  Description: Use the timezone resource included in Chef Infra Client 14.6+ instead of shelling out to tzutil
1340
1356
  StyleGuide: '#chefmodernizeexecutetzutil'
1341
1357
  Enabled: true
@@ -1343,7 +1359,7 @@ ChefModernize/ExecuteTzUtil:
1343
1359
  Exclude:
1344
1360
  - '**/metadata.rb'
1345
1361
 
1346
- ChefModernize/OpensslRsaKeyResource:
1362
+ Chef/Modernize/OpensslRsaKeyResource:
1347
1363
  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.
1348
1364
  StyleGuide: '#chefmodernizeopensslrsakeyresource'
1349
1365
  Enabled: true
@@ -1351,7 +1367,7 @@ ChefModernize/OpensslRsaKeyResource:
1351
1367
  Exclude:
1352
1368
  - '**/metadata.rb'
1353
1369
 
1354
- ChefModernize/OpensslX509Resource:
1370
+ Chef/Modernize/OpensslX509Resource:
1355
1371
  Description: The openssl_x509 resource was renamed to openssl_x509_certificate in Chef Infra Client 14.4. The new resource name should be used.
1356
1372
  StyleGuide: '#chefmodernizeopensslx509resource'
1357
1373
  Enabled: true
@@ -1359,7 +1375,7 @@ ChefModernize/OpensslX509Resource:
1359
1375
  Exclude:
1360
1376
  - '**/metadata.rb'
1361
1377
 
1362
- ChefModernize/OsxConfigProfileResource:
1378
+ Chef/Modernize/OsxConfigProfileResource:
1363
1379
  Description: The osx_config_profile resource was renamed to osx_profile. The new resource name should be used.
1364
1380
  StyleGuide: '#chefmodernizeosxconfigprofileresource'
1365
1381
  Enabled: true
@@ -1367,7 +1383,7 @@ ChefModernize/OsxConfigProfileResource:
1367
1383
  Exclude:
1368
1384
  - '**/metadata.rb'
1369
1385
 
1370
- ChefModernize/SysctlParamResource:
1386
+ Chef/Modernize/SysctlParamResource:
1371
1387
  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.
1372
1388
  StyleGuide: '#chefmodernizesysctlparamresource'
1373
1389
  Enabled: true
@@ -1375,7 +1391,7 @@ ChefModernize/SysctlParamResource:
1375
1391
  Exclude:
1376
1392
  - '**/metadata.rb'
1377
1393
 
1378
- ChefModernize/MacOsXUserdefaults:
1394
+ Chef/Modernize/MacOsXUserdefaults:
1379
1395
  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.
1380
1396
  StyleGuide: '#chefmodernizemacosxuserdefaults'
1381
1397
  Enabled: true
@@ -1383,7 +1399,7 @@ ChefModernize/MacOsXUserdefaults:
1383
1399
  Exclude:
1384
1400
  - '**/metadata.rb'
1385
1401
 
1386
- ChefModernize/PowerShellGuardInterpreter:
1402
+ Chef/Modernize/PowerShellGuardInterpreter:
1387
1403
  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.
1388
1404
  StyleGuide: '#chefmodernizepowershellguardinterpreter'
1389
1405
  Enabled: true
@@ -1391,7 +1407,7 @@ ChefModernize/PowerShellGuardInterpreter:
1391
1407
  Exclude:
1392
1408
  - '**/metadata.rb'
1393
1409
 
1394
- ChefModernize/DefaultActionFromInitialize:
1410
+ Chef/Modernize/DefaultActionFromInitialize:
1395
1411
  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.
1396
1412
  StyleGuide: '#chefmodernizedefaultactionfrominitialize'
1397
1413
  Enabled: true
@@ -1401,7 +1417,7 @@ ChefModernize/DefaultActionFromInitialize:
1401
1417
  - '**/providers/*.rb'
1402
1418
  - '**/libraries/*.rb'
1403
1419
 
1404
- ChefModernize/ResourceNameFromInitialize:
1420
+ Chef/Modernize/ResourceNameFromInitialize:
1405
1421
  Description: The name of a resource can be set with the "resource_name" helper instead of using the initialize method.
1406
1422
  StyleGuide: '#chefmodernizeresourcenamefrominitialize'
1407
1423
  Enabled: true
@@ -1411,7 +1427,7 @@ ChefModernize/ResourceNameFromInitialize:
1411
1427
  - '**/providers/*.rb'
1412
1428
  - '**/libraries/*.rb'
1413
1429
 
1414
- ChefModernize/Definitions:
1430
+ Chef/Modernize/Definitions:
1415
1431
  Description: Legacy Chef Infra definitions should be rewritten as custom resources to take full advantage of the Chef Infra feature set.
1416
1432
  StyleGuide: '#chefmodernizedefinitions'
1417
1433
  Enabled: true
@@ -1419,7 +1435,7 @@ ChefModernize/Definitions:
1419
1435
  Include:
1420
1436
  - '**/definitions/*.rb'
1421
1437
 
1422
- ChefModernize/IfProvidesDefaultAction:
1438
+ Chef/Modernize/IfProvidesDefaultAction:
1423
1439
  Description: if defined?(default_action) is no longer necessary in Chef Infra resources as default_action shipped in Chef Infra Client 10.8.
1424
1440
  StyleGuide: '#chefmodernizeifprovidesdefaultaction'
1425
1441
  Enabled: true
@@ -1428,13 +1444,13 @@ ChefModernize/IfProvidesDefaultAction:
1428
1444
  - '**/resources/*.rb'
1429
1445
  - '**/libraries/*.rb'
1430
1446
 
1431
- ChefModernize/ZipfileResource:
1447
+ Chef/Modernize/ZipfileResource:
1432
1448
  Description: Use the archive_file resource built into Chef Infra Client 15+ instead of the zipfile resource from the zipfile cookbook.
1433
1449
  StyleGuide: '#chefmodernizezipfileresource'
1434
1450
  Enabled: true
1435
1451
  VersionAdded: '5.12.0'
1436
1452
 
1437
- ChefModernize/UnnecessaryMixlibShelloutRequire:
1453
+ Chef/Modernize/UnnecessaryMixlibShelloutRequire:
1438
1454
  Description: Chef Infra Client 12.4 and later include mixlib/shellout automatically in resources and providers.
1439
1455
  StyleGuide: '#chefmodernizeunnecessarymixlibshelloutrequire'
1440
1456
  Enabled: true
@@ -1443,7 +1459,7 @@ ChefModernize/UnnecessaryMixlibShelloutRequire:
1443
1459
  - '**/resources/*.rb'
1444
1460
  - '**/providers/*.rb'
1445
1461
 
1446
- ChefModernize/EmptyResourceInitializeMethod:
1462
+ Chef/Modernize/EmptyResourceInitializeMethod:
1447
1463
  Description: There is no need for an empty initialize method in a resource
1448
1464
  StyleGuide: '#chefmodernizeemptyresourceinitializemethod'
1449
1465
  Enabled: true
@@ -1452,7 +1468,7 @@ ChefModernize/EmptyResourceInitializeMethod:
1452
1468
  - '**/resources/*.rb'
1453
1469
  - '**/providers/*.rb'
1454
1470
 
1455
- ChefModernize/ChefGemNokogiri:
1471
+ Chef/Modernize/ChefGemNokogiri:
1456
1472
  Description: The nokogiri gem ships in Chef Infra Client 12+ and does not need to be installed before being used.
1457
1473
  StyleGuide: '#chefmodernizechefgemnokogiri'
1458
1474
  Enabled: true
@@ -1461,7 +1477,7 @@ ChefModernize/ChefGemNokogiri:
1461
1477
  - '**/metadata.rb'
1462
1478
  - '**/attributes/*.rb'
1463
1479
 
1464
- ChefModernize/PropertyWithNameAttribute:
1480
+ Chef/Modernize/PropertyWithNameAttribute:
1465
1481
  Description: Resource property sets name_attribute not name_property
1466
1482
  StyleGuide: '#chefmodernizepropertywithnameattribute'
1467
1483
  Enabled: true
@@ -1471,7 +1487,7 @@ ChefModernize/PropertyWithNameAttribute:
1471
1487
  - '**/resources/*.rb'
1472
1488
  - '**/libraries/*.rb'
1473
1489
 
1474
- ChefModernize/IncludingOhaiDefaultRecipe:
1490
+ Chef/Modernize/IncludingOhaiDefaultRecipe:
1475
1491
  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.
1476
1492
  StyleGuide: '#chefmodernizeincludingohaidefaultrecipe'
1477
1493
  Enabled: true
@@ -1481,7 +1497,7 @@ ChefModernize/IncludingOhaiDefaultRecipe:
1481
1497
  - '**/metadata.rb'
1482
1498
  - '**/Berksfile'
1483
1499
 
1484
- ChefModernize/AllowedActionsFromInitialize:
1500
+ Chef/Modernize/AllowedActionsFromInitialize:
1485
1501
  Description: The allowed actions of a resource can be set with the "allowed_actions" helper instead of using the initialize method.
1486
1502
  StyleGuide: '#chefmodernizeallowedactionsfrominitialize'
1487
1503
  Enabled: true
@@ -1490,7 +1506,7 @@ ChefModernize/AllowedActionsFromInitialize:
1490
1506
  - '**/resources/*.rb'
1491
1507
  - '**/libraries/*.rb'
1492
1508
 
1493
- ChefModernize/FoodcriticComments:
1509
+ Chef/Modernize/FoodcriticComments:
1494
1510
  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.
1495
1511
  StyleGuide: '#chefmodernizefoodcriticcomments'
1496
1512
  Enabled: true
@@ -1498,7 +1514,7 @@ ChefModernize/FoodcriticComments:
1498
1514
  Exclude:
1499
1515
  - '**/Berksfile'
1500
1516
 
1501
- ChefModernize/ExecuteScExe:
1517
+ Chef/Modernize/ExecuteScExe:
1502
1518
  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
1503
1519
  StyleGuide: '#chefmodernizeexecutescexe'
1504
1520
  Enabled: true
@@ -1508,7 +1524,7 @@ ChefModernize/ExecuteScExe:
1508
1524
  - '**/attributes/*.rb'
1509
1525
  - '**/Berksfile'
1510
1526
 
1511
- ChefModernize/WindowsScResource:
1527
+ Chef/Modernize/WindowsScResource:
1512
1528
  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.
1513
1529
  StyleGuide: '#chefmodernizewindowsscresource'
1514
1530
  Enabled: true
@@ -1518,7 +1534,7 @@ ChefModernize/WindowsScResource:
1518
1534
  - '**/attributes/*.rb'
1519
1535
  - '**/Berksfile'
1520
1536
 
1521
- ChefModernize/ExecuteSleep:
1537
+ Chef/Modernize/ExecuteSleep:
1522
1538
  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.
1523
1539
  StyleGuide: '#chefmodernizeexecutesleep'
1524
1540
  Enabled: true
@@ -1528,7 +1544,7 @@ ChefModernize/ExecuteSleep:
1528
1544
  - '**/attributes/*.rb'
1529
1545
  - '**/Berksfile'
1530
1546
 
1531
- ChefModernize/DslIncludeInResource:
1547
+ Chef/Modernize/DslIncludeInResource:
1532
1548
  Description: 'There is no need to include Chef::DSL::Recipe or Chef::DSL::IncludeRecipe classes in resources or providers as this is done automatically.'
1533
1549
  StyleGuide: '#chefmodernizedslincludeinresource'
1534
1550
  Enabled: true
@@ -1537,7 +1553,7 @@ ChefModernize/DslIncludeInResource:
1537
1553
  - '**/resources/*.rb'
1538
1554
  - '**/providers/*.rb'
1539
1555
 
1540
- ChefModernize/ResourceForcingCompileTime:
1556
+ Chef/Modernize/ResourceForcingCompileTime:
1541
1557
  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`.
1542
1558
  StyleGuide: '#chefmodernizeresourceforcingcompiletime'
1543
1559
  Enabled: true
@@ -1547,7 +1563,7 @@ ChefModernize/ResourceForcingCompileTime:
1547
1563
  - '**/attributes/*.rb'
1548
1564
  - '**/Berksfile'
1549
1565
 
1550
- ChefModernize/ExecuteSysctl:
1566
+ Chef/Modernize/ExecuteSysctl:
1551
1567
  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.
1552
1568
  StyleGuide: '#chefmodernizeexecutesysctl'
1553
1569
  Enabled: true
@@ -1557,7 +1573,7 @@ ChefModernize/ExecuteSysctl:
1557
1573
  - '**/attributes/*.rb'
1558
1574
  - '**/Berksfile'
1559
1575
 
1560
- ChefModernize/SimplifyAptPpaSetup:
1576
+ Chef/Modernize/SimplifyAptPpaSetup:
1561
1577
  Description: The apt_repository resource allows setting up PPAs without using the full URL to ppa.launchpad.net.
1562
1578
  StyleGuide: '#chefmodernizesimplifyaptppasetup'
1563
1579
  Enabled: true
@@ -1567,7 +1583,7 @@ ChefModernize/SimplifyAptPpaSetup:
1567
1583
  - '**/attributes/*.rb'
1568
1584
  - '**/Berksfile'
1569
1585
 
1570
- ChefModernize/UseRequireRelative:
1586
+ Chef/Modernize/UseRequireRelative:
1571
1587
  Description: Instead of using require with a File.expand_path and __FILE__ use the simpler require_relative method.
1572
1588
  StyleGuide: '#chefmodernizeuserequirerelative'
1573
1589
  Enabled: true
@@ -1577,7 +1593,7 @@ ChefModernize/UseRequireRelative:
1577
1593
  - '**/attributes/*.rb'
1578
1594
  - '**/Berksfile'
1579
1595
 
1580
- ChefModernize/NodeInitPackage:
1596
+ Chef/Modernize/NodeInitPackage:
1581
1597
  Description: Use node['init_package'] to check for systemd instead of reading the contents of '/proc/1/comm'
1582
1598
  StyleGuide: '#chefmodernizenodeinitpackage'
1583
1599
  Enabled: true
@@ -1586,7 +1602,7 @@ ChefModernize/NodeInitPackage:
1586
1602
  - '**/metadata.rb'
1587
1603
  - '**/Berksfile'
1588
1604
 
1589
- ChefModernize/WindowsRegistryUAC:
1605
+ Chef/Modernize/WindowsRegistryUAC:
1590
1606
  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.
1591
1607
  StyleGuide: '#chefmodernizewindowsregistryuac'
1592
1608
  Enabled: true
@@ -1596,7 +1612,7 @@ ChefModernize/WindowsRegistryUAC:
1596
1612
  - '**/attributes/*.rb'
1597
1613
  - '**/Berksfile'
1598
1614
 
1599
- ChefModernize/UseMultipackageInstalls:
1615
+ Chef/Modernize/UseMultipackageInstalls:
1600
1616
  Description: Pass an array of packages to package resources instead of iterating over an array of packages when using multi-package capable package subsystem such as apt, yum, chocolatey, dnf, or zypper. Multi-package installs are faster and simplify logs.
1601
1617
  StyleGuide: '#chefmodernizeusemultipackageinstalls'
1602
1618
  Enabled: true
@@ -1606,7 +1622,7 @@ ChefModernize/UseMultipackageInstalls:
1606
1622
  - '**/attributes/*.rb'
1607
1623
  - '**/Berksfile'
1608
1624
 
1609
- ChefModernize/ProvidesFromInitialize:
1625
+ Chef/Modernize/ProvidesFromInitialize:
1610
1626
  Description: Provides should be set using the `provides` resource DSL method instead of instead of setting @provides in the initialize method.
1611
1627
  StyleGuide: '#chefmodernizeprovidesfrominitialize'
1612
1628
  Enabled: true
@@ -1616,7 +1632,7 @@ ChefModernize/ProvidesFromInitialize:
1616
1632
  - '**/providers/*.rb'
1617
1633
  - '**/libraries/*.rb'
1618
1634
 
1619
- ChefModernize/DatabagHelpers:
1635
+ Chef/Modernize/DatabagHelpers:
1620
1636
  Description: Use the `data_bag_item` helper instead of `Chef::DataBagItem.load` or `Chef::EncryptedDataBagItem.load`.
1621
1637
  StyleGuide: '#chefmodernizedatabaghelpers'
1622
1638
  Enabled: true
@@ -1625,7 +1641,7 @@ ChefModernize/DatabagHelpers:
1625
1641
  - '**/metadata.rb'
1626
1642
  - '**/Berksfile'
1627
1643
 
1628
- ChefModernize/NodeRolesInclude:
1644
+ Chef/Modernize/NodeRolesInclude:
1629
1645
  Description: Use `node.role?('foo')` to check if a node includes a role instead of `node['roles'].include?('foo')`.
1630
1646
  StyleGuide: '#chefmodernizenoderolesinclude'
1631
1647
  Enabled: true
@@ -1634,7 +1650,7 @@ ChefModernize/NodeRolesInclude:
1634
1650
  - '**/metadata.rb'
1635
1651
  - '**/Berksfile'
1636
1652
 
1637
- ChefModernize/RespondToCompileTime:
1653
+ Chef/Modernize/RespondToCompileTime:
1638
1654
  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.
1639
1655
  StyleGuide: '#chefmodernizeresondtocompiletime'
1640
1656
  Enabled: true
@@ -1643,7 +1659,7 @@ ChefModernize/RespondToCompileTime:
1643
1659
  - '**/metadata.rb'
1644
1660
  - '**/Berksfile'
1645
1661
 
1646
- ChefModernize/ShellOutHelper:
1662
+ Chef/Modernize/ShellOutHelper:
1647
1663
  Description: Use the built-in shell_out helper available in Chef Infra Client 12.11+ instead of calling Mixlib::ShellOut.new('foo').run_command.
1648
1664
  StyleGuide: '#chefmodernizeshellouthelper'
1649
1665
  Enabled: true
@@ -1653,7 +1669,7 @@ ChefModernize/ShellOutHelper:
1653
1669
  - '**/Berksfile'
1654
1670
  - '**/libraries/*.rb'
1655
1671
 
1656
- ChefModernize/ConditionalUsingTest:
1672
+ Chef/Modernize/ConditionalUsingTest:
1657
1673
  Description: Use ::File.exist?('/foo/bar') instead of the slower 'test -f /foo/bar' which requires shelling out.
1658
1674
  StyleGuide: '#chefmodernizeconditionalusingtest'
1659
1675
  Enabled: true
@@ -1663,7 +1679,7 @@ ChefModernize/ConditionalUsingTest:
1663
1679
  - '**/Berksfile'
1664
1680
  - '**/attributes/*.rb'
1665
1681
 
1666
- ChefModernize/CronDFileOrTemplate:
1682
+ Chef/Modernize/CronDFileOrTemplate:
1667
1683
  Description: Use the cron_d resource that ships with Chef Infra Client 14.4+ instead of manually creating the file with template, file, or cookbook_file resources
1668
1684
  StyleGuide: '#chefmodernizecrondfileortemplate'
1669
1685
  Enabled: true
@@ -1673,7 +1689,7 @@ ChefModernize/CronDFileOrTemplate:
1673
1689
  - '**/Berksfile'
1674
1690
  - '**/attributes/*.rb'
1675
1691
 
1676
- ChefModernize/ActionMethodInResource:
1692
+ Chef/Modernize/ActionMethodInResource:
1677
1693
  Description: Use the custom resource language's `action :my_action` blocks instead of creating actions with methods.
1678
1694
  StyleGuide: '#chefmodernizeactionmethodinresource'
1679
1695
  Enabled: true
@@ -1684,13 +1700,13 @@ ChefModernize/ActionMethodInResource:
1684
1700
  - '**/libraries/*.rb'
1685
1701
 
1686
1702
  ###############################
1687
- # ChefRedundantCode: Cleanup unnecessary code in your cookbooks regardless of Chef Infra Client release
1703
+ # Chef/RedundantCode: Cleanup unnecessary code in your cookbooks regardless of Chef Infra Client release
1688
1704
  ###############################
1689
1705
 
1690
- ChefRedundantCode:
1706
+ Chef/RedundantCode:
1691
1707
  StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefredundantcode.md
1692
1708
 
1693
- ChefRedundantCode/ConflictsMetadata:
1709
+ Chef/RedundantCode/ConflictsMetadata:
1694
1710
  Description: Don't use the deprecated 'conflicts' metadata value
1695
1711
  StyleGuide: '#chefredundantcodeconflictsmetadata'
1696
1712
  Enabled: true
@@ -1699,7 +1715,7 @@ ChefRedundantCode/ConflictsMetadata:
1699
1715
  Include:
1700
1716
  - '**/metadata.rb'
1701
1717
 
1702
- ChefRedundantCode/SuggestsMetadata:
1718
+ Chef/RedundantCode/SuggestsMetadata:
1703
1719
  Description: The suggests metadata.rb method is not used and is unnecessary in cookbooks.
1704
1720
  StyleGuide: '#chefredundantcodesuggestsmetadata'
1705
1721
  Enabled: true
@@ -1708,7 +1724,7 @@ ChefRedundantCode/SuggestsMetadata:
1708
1724
  Include:
1709
1725
  - '**/metadata.rb'
1710
1726
 
1711
- ChefRedundantCode/ProvidesMetadata:
1727
+ Chef/RedundantCode/ProvidesMetadata:
1712
1728
  Description: The provides metadata.rb method is not used and is unnecessary in cookbooks.
1713
1729
  StyleGuide: '#chefredundantcodeprovidesmetadata'
1714
1730
  Enabled: true
@@ -1717,7 +1733,7 @@ ChefRedundantCode/ProvidesMetadata:
1717
1733
  Include:
1718
1734
  - '**/metadata.rb'
1719
1735
 
1720
- ChefRedundantCode/ReplacesMetadata:
1736
+ Chef/RedundantCode/ReplacesMetadata:
1721
1737
  Description: The replaces metadata.rb method is not used and is unnecessary in cookbooks.
1722
1738
  StyleGuide: '#chefredundantcodereplacesmetadata'
1723
1739
  Enabled: true
@@ -1726,7 +1742,7 @@ ChefRedundantCode/ReplacesMetadata:
1726
1742
  Include:
1727
1743
  - '**/metadata.rb'
1728
1744
 
1729
- ChefRedundantCode/AttributeMetadata:
1745
+ Chef/RedundantCode/AttributeMetadata:
1730
1746
  Description: The attribute metadata.rb method is not used and is unnecessary in cookbooks.
1731
1747
  StyleGuide: '#chefredundantcodeattributemetadata'
1732
1748
  Enabled: true
@@ -1735,7 +1751,7 @@ ChefRedundantCode/AttributeMetadata:
1735
1751
  Include:
1736
1752
  - '**/metadata.rb'
1737
1753
 
1738
- ChefRedundantCode/LongDescriptionMetadata:
1754
+ Chef/RedundantCode/LongDescriptionMetadata:
1739
1755
  Description: The long_description metadata.rb method is not used and is unnecessary in cookbooks
1740
1756
  StyleGuide: '#chefredundantcodelongdescriptionmetadata'
1741
1757
  Enabled: true
@@ -1744,7 +1760,7 @@ ChefRedundantCode/LongDescriptionMetadata:
1744
1760
  Include:
1745
1761
  - '**/metadata.rb'
1746
1762
 
1747
- ChefRedundantCode/RecipeMetadata:
1763
+ Chef/RedundantCode/RecipeMetadata:
1748
1764
  Description: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the README.md file instead.
1749
1765
  StyleGuide: '#chefredundantcoderecipemetadata'
1750
1766
  Enabled: true
@@ -1753,7 +1769,7 @@ ChefRedundantCode/RecipeMetadata:
1753
1769
  Include:
1754
1770
  - '**/metadata.rb'
1755
1771
 
1756
- ChefRedundantCode/ResourceWithNothingAction:
1772
+ Chef/RedundantCode/ResourceWithNothingAction:
1757
1773
  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.
1758
1774
  StyleGuide: '#chefredundantcoderesourcewithnothingaction'
1759
1775
  Enabled: true
@@ -1764,7 +1780,7 @@ ChefRedundantCode/ResourceWithNothingAction:
1764
1780
  - '**/resources/*.rb'
1765
1781
  - '**/providers/*.rb'
1766
1782
 
1767
- ChefRedundantCode/UnnecessaryNameProperty:
1783
+ Chef/RedundantCode/UnnecessaryNameProperty:
1768
1784
  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.
1769
1785
  StyleGuide: '#chefredundantcodeunnecessarynameproperty'
1770
1786
  Enabled: true
@@ -1774,7 +1790,7 @@ ChefRedundantCode/UnnecessaryNameProperty:
1774
1790
  - '**/resources/*.rb'
1775
1791
  - '**/libraries/*.rb'
1776
1792
 
1777
- ChefRedundantCode/PropertyWithRequiredAndDefault:
1793
+ Chef/RedundantCode/PropertyWithRequiredAndDefault:
1778
1794
  Description: Resource property should not be both required and have a default value
1779
1795
  StyleGuide: '#chefredundantcodepropertywithrequiredanddefault'
1780
1796
  Enabled: true
@@ -1784,7 +1800,7 @@ ChefRedundantCode/PropertyWithRequiredAndDefault:
1784
1800
  - '**/resources/*.rb'
1785
1801
  - '**/libraries/*.rb'
1786
1802
 
1787
- ChefRedundantCode/NamePropertyIsRequired:
1803
+ Chef/RedundantCode/NamePropertyIsRequired:
1788
1804
  Description: Resource properties marked as name properties should not also be required properties
1789
1805
  StyleGuide: '#chefredundantcodenamepropertyisrequired'
1790
1806
  Enabled: true
@@ -1794,7 +1810,7 @@ ChefRedundantCode/NamePropertyIsRequired:
1794
1810
  - '**/resources/*.rb'
1795
1811
  - '**/libraries/*.rb'
1796
1812
 
1797
- ChefRedundantCode/CustomResourceWithAllowedActions:
1813
+ Chef/RedundantCode/CustomResourceWithAllowedActions:
1798
1814
  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.
1799
1815
  StyleGuide: '#chefredundantcodecustomresourcewithallowedactions'
1800
1816
  Enabled: true
@@ -1803,7 +1819,7 @@ ChefRedundantCode/CustomResourceWithAllowedActions:
1803
1819
  Include:
1804
1820
  - '**/resources/*.rb'
1805
1821
 
1806
- ChefRedundantCode/SensitivePropertyInResource:
1822
+ Chef/RedundantCode/SensitivePropertyInResource:
1807
1823
  Description: Every Chef Infra resources already include a sensitive property with a default value of false.
1808
1824
  StyleGuide: '#chefredundantcodesensitivepropertyinresource'
1809
1825
  Enabled: true
@@ -1812,7 +1828,7 @@ ChefRedundantCode/SensitivePropertyInResource:
1812
1828
  - '**/resources/*.rb'
1813
1829
  - '**/libraries/*.rb'
1814
1830
 
1815
- ChefRedundantCode/UnnecessaryDesiredState:
1831
+ Chef/RedundantCode/UnnecessaryDesiredState:
1816
1832
  Description: 'There is no need to set a property to desired_state: true as all properties have a desired_state of true by default.'
1817
1833
  StyleGuide: '#chefredundantcodeunnecessarydesiredstate'
1818
1834
  Enabled: true
@@ -1821,7 +1837,7 @@ ChefRedundantCode/UnnecessaryDesiredState:
1821
1837
  - '**/resources/*.rb'
1822
1838
  - '**/libraries/*.rb'
1823
1839
 
1824
- ChefRedundantCode/AptRepositoryNotifiesAptUpdate:
1840
+ Chef/RedundantCode/AptRepositoryNotifiesAptUpdate:
1825
1841
  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.
1826
1842
  StyleGuide: '#chefredundantcodeaptrepositorynotifiesaptupdate'
1827
1843
  Enabled: true
@@ -1831,7 +1847,7 @@ ChefRedundantCode/AptRepositoryNotifiesAptUpdate:
1831
1847
  - '**/attributes/*.rb'
1832
1848
  - '**/Berksfile'
1833
1849
 
1834
- ChefRedundantCode/AptRepositoryDistributionDefault:
1850
+ Chef/RedundantCode/AptRepositoryDistributionDefault:
1835
1851
  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.
1836
1852
  StyleGuide: '#chefredundantcodeaptrepositorydistributiondefault'
1837
1853
  Enabled: true
@@ -1841,7 +1857,7 @@ ChefRedundantCode/AptRepositoryDistributionDefault:
1841
1857
  - '**/attributes/*.rb'
1842
1858
  - '**/Berksfile'
1843
1859
 
1844
- ChefRedundantCode/GroupingMetadata:
1860
+ Chef/RedundantCode/GroupingMetadata:
1845
1861
  Description: The grouping metadata.rb method is not used and is unnecessary in cookbooks.
1846
1862
  StyleGuide: '#chefredundantcodegroupingmetadata'
1847
1863
  Enabled: true
@@ -1849,7 +1865,7 @@ ChefRedundantCode/GroupingMetadata:
1849
1865
  Include:
1850
1866
  - '**/metadata.rb'
1851
1867
 
1852
- ChefRedundantCode/StringPropertyWithNilDefault:
1868
+ Chef/RedundantCode/StringPropertyWithNilDefault:
1853
1869
  Description: Properties have a nil value by default so there is no need to set the default value to nil.
1854
1870
  StyleGuide: '#chefredundantcodestringpropertywithnildefault'
1855
1871
  Enabled: true
@@ -1858,7 +1874,7 @@ ChefRedundantCode/StringPropertyWithNilDefault:
1858
1874
  - '**/resources/*.rb'
1859
1875
  - '**/libraries/*.rb'
1860
1876
 
1861
- ChefRedundantCode/PropertySplatRegex:
1877
+ Chef/RedundantCode/PropertySplatRegex:
1862
1878
  Description: There is no need to validate the input of properties in resources using a regex value that will always pass.
1863
1879
  StyleGuide: '#chefredundantcodepropertysplatregex'
1864
1880
  Enabled: true
@@ -1867,7 +1883,7 @@ ChefRedundantCode/PropertySplatRegex:
1867
1883
  - '**/resources/*.rb'
1868
1884
  - '**/libraries/*.rb'
1869
1885
 
1870
- ChefRedundantCode/UseCreateIfMissing:
1886
+ Chef/RedundantCode/UseCreateIfMissing:
1871
1887
  Description: Use the :create_if_missing action instead of not_if with a ::File.exist(FOO) check.
1872
1888
  StyleGuide: '#chefredundantcodeusecreateifmissing'
1873
1889
  Enabled: true
@@ -1877,7 +1893,7 @@ ChefRedundantCode/UseCreateIfMissing:
1877
1893
  - '**/attributes/*.rb'
1878
1894
  - '**/Berksfile'
1879
1895
 
1880
- ChefRedundantCode/OhaiAttributeToString:
1896
+ Chef/RedundantCode/OhaiAttributeToString:
1881
1897
  Description: Many Ohai node attributes are already strings and don't need to be cast to strings again
1882
1898
  StyleGuide: '#chefredundantcodeohaiattributetostring'
1883
1899
  Enabled: true
@@ -1886,7 +1902,7 @@ ChefRedundantCode/OhaiAttributeToString:
1886
1902
  - '**/metadata.rb'
1887
1903
  - '**/Berksfile'
1888
1904
 
1889
- ChefRedundantCode/MultiplePlatformChecks:
1905
+ Chef/RedundantCode/MultiplePlatformChecks:
1890
1906
  Description: You can pass multiple values to the platform? and platform_family? helpers instead of calling the helpers multiple times.
1891
1907
  StyleGuide: '#chefredundantcodemultipleplatformchecks'
1892
1908
  Enabled: true
@@ -1895,7 +1911,7 @@ ChefRedundantCode/MultiplePlatformChecks:
1895
1911
  - '**/metadata.rb'
1896
1912
  - '**/Berksfile'
1897
1913
 
1898
- ChefRedundantCode/DoubleCompileTime:
1914
+ Chef/RedundantCode/DoubleCompileTime:
1899
1915
  Description: If a resource includes the `compile_time` property there's no need to also use `.run_action(:some_action)` on the resource block
1900
1916
  StyleGuide: '#chefredundantcodedoublecompiletime'
1901
1917
  Enabled: true
@@ -1906,13 +1922,13 @@ ChefRedundantCode/DoubleCompileTime:
1906
1922
  - '**/Berksfile'
1907
1923
 
1908
1924
  ###############################
1909
- # ChefEffortless: Migrating to new patterns
1925
+ # Chef/Effortless: Migrating to new patterns
1910
1926
  ###############################
1911
1927
 
1912
- ChefEffortless:
1928
+ Chef/Effortless:
1913
1929
  StyleGuideBaseURL: https://github.com/chef/cookstyle/blob/master/docs/cops_chefeffortless.md
1914
1930
 
1915
- ChefEffortless/CookbookUsesSearch:
1931
+ Chef/Effortless/CookbookUsesSearch:
1916
1932
  Description: Cookbook uses search, which cannot be used in the Effortless Infra pattern
1917
1933
  StyleGuide: '#chefeffortlesscookbookusessearch'
1918
1934
  Enabled: false
@@ -1921,7 +1937,7 @@ ChefEffortless/CookbookUsesSearch:
1921
1937
  - '**/metadata.rb'
1922
1938
  - '**/Berksfile'
1923
1939
 
1924
- ChefEffortless/CookbookUsesDatabags:
1940
+ Chef/Effortless/CookbookUsesDatabags:
1925
1941
  Description: Cookbook uses data bags, which cannot be used in the Effortless Infra pattern
1926
1942
  StyleGuide: '#chefeffortlesscookbookusesdatabags'
1927
1943
  Enabled: false
@@ -1929,9 +1945,9 @@ ChefEffortless/CookbookUsesDatabags:
1929
1945
  Exclude:
1930
1946
  - '**/metadata.rb'
1931
1947
  - '**/Berksfile'
1932
-
1948
+
1933
1949
  # https://github.com/chef/cookstyle/issues/346
1934
- ChefEffortless/ChefVaultUsed:
1950
+ Chef/Effortless/ChefVaultUsed:
1935
1951
  Description: Cookbook uses Chef Vault, which cannot be used in the Effortless Infra pattern
1936
1952
  StyleGuide: '#chefeffortlesscookbookuseschefvault'
1937
1953
  Enabled: false
@@ -1941,7 +1957,7 @@ ChefEffortless/ChefVaultUsed:
1941
1957
  - '**/Berksfile'
1942
1958
 
1943
1959
  # https://github.com/chef/cookstyle/issues/346
1944
- ChefEffortless/DependsChefVault:
1960
+ Chef/Effortless/DependsChefVault:
1945
1961
  Description: Cookbook depends on Chef Vault, which cannot be used in the Effortless Infra pattern
1946
1962
  StyleGuide: '#chefeffortlesscookbookdependschefvault'
1947
1963
  Enabled: false
@@ -1949,7 +1965,7 @@ ChefEffortless/DependsChefVault:
1949
1965
  Include:
1950
1966
  - '**/metadata.rb'
1951
1967
 
1952
- ChefEffortless/CookbookUsesEnvironments:
1968
+ Chef/Effortless/CookbookUsesEnvironments:
1953
1969
  Description: Cookbook uses environments, which cannot be used in the Effortless Infra pattern
1954
1970
  StyleGuide: '#chefeffortlesscookbookusesenvironments'
1955
1971
  Enabled: false
@@ -1958,7 +1974,7 @@ ChefEffortless/CookbookUsesEnvironments:
1958
1974
  - '**/metadata.rb'
1959
1975
  - '**/Berksfile'
1960
1976
 
1961
- ChefEffortless/CookbookUsesPolicygroups:
1977
+ Chef/Effortless/CookbookUsesPolicygroups:
1962
1978
  Description: Cookbook uses Policy Groups, which cannot be used in the Effortless Infra pattern
1963
1979
  StyleGuide: '#chefeffortlesscookbookusespolicygroups'
1964
1980
  Enabled: false
@@ -1967,7 +1983,7 @@ ChefEffortless/CookbookUsesPolicygroups:
1967
1983
  - '**/metadata.rb'
1968
1984
  - '**/Berksfile'
1969
1985
 
1970
- ChefEffortless/CookbookUsesRoles:
1986
+ Chef/Effortless/CookbookUsesRoles:
1971
1987
  Description: Cookbook uses Roles, which cannot be used in the Effortless Infra pattern
1972
1988
  StyleGuide: '#chefeffortlesscookbookusesroles'
1973
1989
  Enabled: false
@@ -1976,7 +1992,7 @@ ChefEffortless/CookbookUsesRoles:
1976
1992
  - '**/metadata.rb'
1977
1993
  - '**/Berksfile'
1978
1994
 
1979
- ChefEffortless/SearchForEnvironmentsOrRoles:
1995
+ Chef/Effortless/SearchForEnvironmentsOrRoles:
1980
1996
  Description: Cookbook uses search with a node query that looks for a role or environment
1981
1997
  StyleGuide: '#chefeffortlesssearchforenvironmentsorroles'
1982
1998
  Enabled: false
@@ -1985,7 +2001,7 @@ ChefEffortless/SearchForEnvironmentsOrRoles:
1985
2001
  - '**/metadata.rb'
1986
2002
  - '**/Berksfile'
1987
2003
 
1988
- ChefEffortless/Berksfile:
2004
+ Chef/Effortless/Berksfile:
1989
2005
  Description: Policyfiles should be used for cookbook dependency solving instead of a Berkshelf Berksfile.
1990
2006
  StyleGuide: '#chefeffortlessberksfile'
1991
2007
  Enabled: false
@@ -2477,10 +2493,9 @@ Style/EachForSimpleLoop:
2477
2493
  Style/EmptyCaseCondition:
2478
2494
  Enabled: true
2479
2495
 
2480
- # == 0 is more performant than .zero? and .zero? also introduced several regressions
2496
+ # It doesn't matter if people use the friendly helpers or not for overall readability
2481
2497
  Style/NumericPredicate:
2482
- Enabled: true
2483
- EnforcedStyle: comparison
2498
+ Enabled: false
2484
2499
 
2485
2500
  # this is bad %w(something another_thing one_more)
2486
2501
  Layout/SpaceInsideArrayPercentLiteral:
@@ -2727,4 +2742,8 @@ Style/Dir:
2727
2742
 
2728
2743
  # Use __FILE__ or __dir__ to simplify expand_paths
2729
2744
  Style/ExpandPathArguments:
2745
+ Enabled: true
2746
+
2747
+ # Avoid a safe navigation operator if we don't need it
2748
+ Lint/RedundantSafeNavigation:
2730
2749
  Enabled: true