cookstyle 6.20.2 → 7.3.10

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