cookstyle 7.5.2 → 7.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/bin/cookstyle +7 -2
  4. data/config/cookstyle.yml +240 -231
  5. data/config/disable_all.yml +22 -0
  6. data/config/upstream.yml +137 -31
  7. data/lib/cookstyle/version.rb +2 -2
  8. data/lib/rubocop/cop/chef/correctness/block_guard_clause_string_only.rb +4 -4
  9. data/lib/rubocop/cop/chef/correctness/chef_application_fatal.rb +2 -2
  10. data/lib/rubocop/cop/chef/correctness/conditional_ruby_shellout.rb +2 -2
  11. data/lib/rubocop/cop/chef/correctness/dnf_package_allow_downgrades.rb +2 -2
  12. data/lib/rubocop/cop/chef/correctness/incorrect_library_injection.rb +2 -2
  13. data/lib/rubocop/cop/chef/correctness/invalid_default_action.rb +2 -2
  14. data/lib/rubocop/cop/chef/correctness/invalid_notification_timing.rb +2 -2
  15. data/lib/rubocop/cop/chef/correctness/invalid_platform_family_helper.rb +2 -2
  16. data/lib/rubocop/cop/chef/correctness/invalid_platform_family_values_in_case.rb +1 -1
  17. data/lib/rubocop/cop/chef/correctness/invalid_platform_helper.rb +2 -2
  18. data/lib/rubocop/cop/chef/correctness/invalid_platform_metadata.rb +2 -2
  19. data/lib/rubocop/cop/chef/correctness/invalid_platform_values_in_case.rb +1 -1
  20. data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_family_helper.rb +2 -2
  21. data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_helper.rb +2 -2
  22. data/lib/rubocop/cop/chef/correctness/invalid_version_metadata.rb +2 -2
  23. data/lib/rubocop/cop/chef/correctness/lazy_eval_node_attribute_defaults.rb +2 -2
  24. data/lib/rubocop/cop/chef/correctness/lazy_in_resource_guard.rb +2 -2
  25. data/lib/rubocop/cop/chef/correctness/macos_userdefaults_invalid_type.rb +2 -2
  26. data/lib/rubocop/cop/chef/correctness/malformed_value_for_platform.rb +2 -2
  27. data/lib/rubocop/cop/chef/correctness/metadata_missing_name.rb +1 -1
  28. data/lib/rubocop/cop/chef/correctness/node_normal.rb +2 -2
  29. data/lib/rubocop/cop/chef/correctness/node_normal_unless.rb +2 -2
  30. data/lib/rubocop/cop/chef/correctness/node_save.rb +1 -1
  31. data/lib/rubocop/cop/chef/correctness/notifies_action_not_symbol.rb +2 -2
  32. data/lib/rubocop/cop/chef/correctness/octal_mode_as_string.rb +2 -2
  33. data/lib/rubocop/cop/chef/correctness/openssl_password_helpers.rb +1 -1
  34. data/lib/rubocop/cop/chef/correctness/powershell_delete_file.rb +2 -2
  35. data/lib/rubocop/cop/chef/correctness/property_without_type.rb +2 -2
  36. data/lib/rubocop/cop/chef/correctness/resource_sets_internal_properties.rb +2 -2
  37. data/lib/rubocop/cop/chef/correctness/resource_sets_name_property.rb +3 -4
  38. data/lib/rubocop/cop/chef/correctness/resource_with_none_action.rb +2 -2
  39. data/lib/rubocop/cop/chef/correctness/scoped_file_exist.rb +2 -2
  40. data/lib/rubocop/cop/chef/correctness/service_resource.rb +1 -1
  41. data/lib/rubocop/cop/chef/correctness/supports_must_be_float.rb +2 -2
  42. data/lib/rubocop/cop/chef/correctness/tmp_path.rb +2 -3
  43. data/lib/rubocop/cop/chef/deprecation/ use_automatic_resource_name.rb +1 -1
  44. data/lib/rubocop/cop/chef/deprecation/cb_depends_on_self.rb +2 -2
  45. data/lib/rubocop/cop/chef/deprecation/chef_handler_recipe.rb +1 -1
  46. data/lib/rubocop/cop/chef/deprecation/chef_handler_supports.rb +2 -2
  47. data/lib/rubocop/cop/chef/deprecation/chef_rest.rb +1 -1
  48. data/lib/rubocop/cop/chef/deprecation/chef_shellout.rb +2 -2
  49. data/lib/rubocop/cop/chef/deprecation/chef_sugar_helpers.rb +1 -1
  50. data/lib/rubocop/cop/chef/deprecation/chef_windows_platform_helper.rb +2 -2
  51. data/lib/rubocop/cop/chef/deprecation/chefdk_generators.rb +2 -2
  52. data/lib/rubocop/cop/chef/deprecation/chefspec_coverage_report.rb +1 -1
  53. data/lib/rubocop/cop/chef/deprecation/chefspec_legacy_runner.rb +2 -2
  54. data/lib/rubocop/cop/chef/deprecation/chocolatey_package_uninstall_action.rb +2 -2
  55. data/lib/rubocop/cop/chef/deprecation/depends_compat_resource.rb +1 -1
  56. data/lib/rubocop/cop/chef/deprecation/depends_partial_search.rb +1 -1
  57. data/lib/rubocop/cop/chef/deprecation/depends_poise.rb +1 -1
  58. data/lib/rubocop/cop/chef/deprecation/deprecated_chefspec_platform.rb +3 -3
  59. data/lib/rubocop/cop/chef/deprecation/deprecated_mixins.rb +1 -1
  60. data/lib/rubocop/cop/chef/deprecation/deprecated_platform_methods.rb +2 -2
  61. data/lib/rubocop/cop/chef/deprecation/deprecated_shellout_methods.rb +2 -2
  62. data/lib/rubocop/cop/chef/deprecation/deprecated_windows_version_check.rb +1 -1
  63. data/lib/rubocop/cop/chef/deprecation/deprecated_yum_repository_actions.rb +2 -2
  64. data/lib/rubocop/cop/chef/deprecation/deprecated_yum_repository_properties.rb +2 -2
  65. data/lib/rubocop/cop/chef/deprecation/easy_install.rb +1 -1
  66. data/lib/rubocop/cop/chef/deprecation/eol_audit_mode.rb +1 -1
  67. data/lib/rubocop/cop/chef/deprecation/epic_fail.rb +2 -2
  68. data/lib/rubocop/cop/chef/deprecation/erl_call.rb +1 -1
  69. data/lib/rubocop/cop/chef/deprecation/execute_path_property.rb +2 -2
  70. data/lib/rubocop/cop/chef/deprecation/execute_relative_creates_without_cwd.rb +2 -2
  71. data/lib/rubocop/cop/chef/deprecation/foodcritic_testing.rb +1 -1
  72. data/lib/rubocop/cop/chef/deprecation/hwrp_without_provides.rb +4 -4
  73. data/lib/rubocop/cop/chef/deprecation/inherits_compat_resource.rb +2 -2
  74. data/lib/rubocop/cop/chef/deprecation/launchd_deprecated_hash_property.rb +2 -2
  75. data/lib/rubocop/cop/chef/deprecation/legacy_notify_syntax.rb +3 -3
  76. data/lib/rubocop/cop/chef/deprecation/legacy_yum_cookbook_recipes.rb +1 -1
  77. data/lib/rubocop/cop/chef/deprecation/librarian_chefspec.rb +1 -1
  78. data/lib/rubocop/cop/chef/deprecation/locale_lc_all_property.rb +1 -1
  79. data/lib/rubocop/cop/chef/deprecation/log_resource_notifications.rb +2 -2
  80. data/lib/rubocop/cop/chef/deprecation/macos_userdefaults_global_property.rb +2 -2
  81. data/lib/rubocop/cop/chef/deprecation/name_property_and_default.rb +2 -2
  82. data/lib/rubocop/cop/chef/deprecation/node_deep_fetch.rb +4 -4
  83. data/lib/rubocop/cop/chef/deprecation/node_methods_not_attributes.rb +2 -2
  84. data/lib/rubocop/cop/chef/deprecation/node_set.rb +2 -2
  85. data/lib/rubocop/cop/chef/deprecation/node_set_unless.rb +2 -2
  86. data/lib/rubocop/cop/chef/deprecation/node_set_without_level.rb +2 -2
  87. data/lib/rubocop/cop/chef/deprecation/partial_search_class_usage.rb +2 -2
  88. data/lib/rubocop/cop/chef/deprecation/partial_search_helper_usage.rb +2 -2
  89. data/lib/rubocop/cop/chef/deprecation/poise_archive.rb +2 -2
  90. data/lib/rubocop/cop/chef/deprecation/powershell_cookbook_helpers.rb +2 -2
  91. data/lib/rubocop/cop/chef/deprecation/require_recipe.rb +2 -2
  92. data/lib/rubocop/cop/chef/deprecation/resource_overrides_provides_method.rb +2 -2
  93. data/lib/rubocop/cop/chef/deprecation/resource_uses_dsl_name_method.rb +2 -2
  94. data/lib/rubocop/cop/chef/deprecation/resource_uses_only_resource_name.rb +1 -1
  95. data/lib/rubocop/cop/chef/deprecation/resource_uses_provider_base_method.rb +1 -1
  96. data/lib/rubocop/cop/chef/deprecation/resource_uses_updated_method.rb +3 -3
  97. data/lib/rubocop/cop/chef/deprecation/ruby_27_keyword_argument_warnings.rb +2 -2
  98. data/lib/rubocop/cop/chef/deprecation/ruby_block_create_action.rb +2 -2
  99. data/lib/rubocop/cop/chef/deprecation/run_command_helper.rb +2 -2
  100. data/lib/rubocop/cop/chef/deprecation/search_uses_positional_parameters.rb +2 -2
  101. data/lib/rubocop/cop/chef/deprecation/use_inline_resources.rb +1 -1
  102. data/lib/rubocop/cop/chef/deprecation/use_yaml_dump.rb +2 -2
  103. data/lib/rubocop/cop/chef/deprecation/user_supports_property.rb +2 -2
  104. data/lib/rubocop/cop/chef/deprecation/verify_property_file_expansion.rb +2 -2
  105. data/lib/rubocop/cop/chef/deprecation/windows_feature_servermanagercmd.rb +2 -2
  106. data/lib/rubocop/cop/chef/deprecation/windows_package_installer_type_string.rb +2 -2
  107. data/lib/rubocop/cop/chef/deprecation/windows_task_change_action.rb +2 -2
  108. data/lib/rubocop/cop/chef/deprecation/windows_version_helpers.rb +2 -2
  109. data/lib/rubocop/cop/chef/deprecation/xml_ruby_recipe.rb +1 -1
  110. data/lib/rubocop/cop/chef/deprecation/yum_dnf_compat_recipe.rb +1 -1
  111. data/lib/rubocop/cop/chef/effortless/chef_vault_used.rb +6 -6
  112. data/lib/rubocop/cop/chef/effortless/data_bags.rb +1 -1
  113. data/lib/rubocop/cop/chef/effortless/depends_chef_vault.rb +1 -1
  114. data/lib/rubocop/cop/chef/effortless/node_environment.rb +1 -1
  115. data/lib/rubocop/cop/chef/effortless/node_policygroup.rb +1 -1
  116. data/lib/rubocop/cop/chef/effortless/node_roles.rb +1 -1
  117. data/lib/rubocop/cop/chef/effortless/search_for_environments_or_roles.rb +1 -1
  118. data/lib/rubocop/cop/chef/effortless/search_used.rb +1 -1
  119. data/lib/rubocop/cop/chef/modernize/action_method_in_resource.rb +2 -2
  120. data/lib/rubocop/cop/chef/modernize/allowed_actions_initializer.rb +2 -2
  121. data/lib/rubocop/cop/chef/modernize/apt_default_recipe.rb +2 -2
  122. data/lib/rubocop/cop/chef/modernize/berksfile_source.rb +3 -5
  123. data/lib/rubocop/cop/chef/modernize/build_essential.rb +2 -2
  124. data/lib/rubocop/cop/chef/modernize/chef_14_resources.rb +1 -1
  125. data/lib/rubocop/cop/chef/modernize/chef_gem_nokogiri.rb +1 -1
  126. data/lib/rubocop/cop/chef/modernize/compile_time_resources.rb +2 -2
  127. data/lib/rubocop/cop/chef/modernize/conditional_using_test.rb +2 -2
  128. data/lib/rubocop/cop/chef/modernize/cron_d_file_or_template.rb +2 -2
  129. data/lib/rubocop/cop/chef/modernize/cron_manage_resource.rb +5 -5
  130. data/lib/rubocop/cop/chef/modernize/databag_helpers.rb +2 -2
  131. data/lib/rubocop/cop/chef/modernize/default_action_initializer.rb +3 -3
  132. data/lib/rubocop/cop/chef/modernize/defines_chefspec_matchers.rb +1 -1
  133. data/lib/rubocop/cop/chef/modernize/depends_zypper_cookbook.rb +1 -1
  134. data/lib/rubocop/cop/chef/modernize/dsl_include_in_resource.rb +3 -1
  135. data/lib/rubocop/cop/chef/modernize/empty_resource_initialize.rb +1 -1
  136. data/lib/rubocop/cop/chef/modernize/execute_apt_update.rb +5 -4
  137. data/lib/rubocop/cop/chef/modernize/execute_sc_exe.rb +6 -4
  138. data/lib/rubocop/cop/chef/modernize/execute_sleep.rb +4 -2
  139. data/lib/rubocop/cop/chef/modernize/execute_sysctl.rb +4 -2
  140. data/lib/rubocop/cop/chef/modernize/execute_tzutil.rb +5 -4
  141. data/lib/rubocop/cop/chef/modernize/foodcritic_comments.rb +1 -1
  142. data/lib/rubocop/cop/chef/modernize/if_provides_default_action.rb +2 -2
  143. data/lib/rubocop/cop/chef/modernize/includes_mixin_shellout.rb +1 -1
  144. data/lib/rubocop/cop/chef/modernize/libarchive_file.rb +2 -2
  145. data/lib/rubocop/cop/chef/modernize/macos_user_defaults.rb +5 -4
  146. data/lib/rubocop/cop/chef/modernize/minitest_handler_usage.rb +1 -1
  147. data/lib/rubocop/cop/chef/modernize/node_init_package.rb +2 -2
  148. data/lib/rubocop/cop/chef/modernize/node_roles_include.rb +2 -2
  149. data/lib/rubocop/cop/chef/modernize/ohai_default_recipe.rb +2 -4
  150. data/lib/rubocop/cop/chef/modernize/openssl_rsa_key_resource.rb +5 -4
  151. data/lib/rubocop/cop/chef/modernize/openssl_x509_resource.rb +5 -4
  152. data/lib/rubocop/cop/chef/modernize/osx_config_profile_resource.rb +5 -4
  153. data/lib/rubocop/cop/chef/modernize/powershell_expand_archive.rb +2 -3
  154. data/lib/rubocop/cop/chef/modernize/powershell_guard_interpreter.rb +2 -2
  155. data/lib/rubocop/cop/chef/modernize/powershell_install_package.rb +3 -4
  156. data/lib/rubocop/cop/chef/modernize/powershell_install_windowsfeature.rb +3 -4
  157. data/lib/rubocop/cop/chef/modernize/property_with_name_attribute.rb +2 -2
  158. data/lib/rubocop/cop/chef/modernize/provides_initializer.rb +2 -2
  159. data/lib/rubocop/cop/chef/modernize/resource_name_initializer.rb +2 -2
  160. data/lib/rubocop/cop/chef/modernize/resource_set_or_return.rb +3 -5
  161. data/lib/rubocop/cop/chef/modernize/resource_with_attributes.rb +3 -5
  162. data/lib/rubocop/cop/chef/modernize/respond_to_compile_time.rb +4 -2
  163. data/lib/rubocop/cop/chef/modernize/respond_to_metadata.rb +3 -4
  164. data/lib/rubocop/cop/chef/modernize/respond_to_provides.rb +2 -2
  165. data/lib/rubocop/cop/chef/modernize/respond_to_resource_name.rb +2 -2
  166. data/lib/rubocop/cop/chef/modernize/sc_windows_resource.rb +6 -4
  167. data/lib/rubocop/cop/chef/modernize/seven_zip_archive.rb +1 -1
  168. data/lib/rubocop/cop/chef/modernize/shell_out_helper.rb +2 -2
  169. data/lib/rubocop/cop/chef/modernize/shellouts_to_chocolatey.rb +1 -1
  170. data/lib/rubocop/cop/chef/modernize/simplify_apt_ppa_setup.rb +2 -2
  171. data/lib/rubocop/cop/chef/modernize/sysctl_param_resource.rb +4 -2
  172. data/lib/rubocop/cop/chef/modernize/unnecessary_mixlib_shellout_require.rb +1 -1
  173. data/lib/rubocop/cop/chef/modernize/use_multipackage_installs.rb +2 -2
  174. data/lib/rubocop/cop/chef/modernize/use_require_relative.rb +2 -2
  175. data/lib/rubocop/cop/chef/modernize/whyrun_supported_true.rb +1 -1
  176. data/lib/rubocop/cop/chef/modernize/windows_default_recipe.rb +1 -1
  177. data/lib/rubocop/cop/chef/modernize/windows_registry_uac.rb +4 -2
  178. data/lib/rubocop/cop/chef/modernize/windows_zipfile.rb +1 -1
  179. data/lib/rubocop/cop/chef/modernize/zipfile_resource.rb +1 -1
  180. data/lib/rubocop/cop/chef/modernize/zypper_repo.rb +2 -2
  181. data/lib/rubocop/cop/chef/redundant/apt_repository_distribution_default.rb +4 -2
  182. data/lib/rubocop/cop/chef/redundant/apt_repository_notifies_apt_update.rb +4 -2
  183. data/lib/rubocop/cop/chef/redundant/attribute_metadata.rb +1 -1
  184. data/lib/rubocop/cop/chef/redundant/conflicts_metadata.rb +1 -1
  185. data/lib/rubocop/cop/chef/redundant/custom_resource_with_allowed_actions.rb +1 -1
  186. data/lib/rubocop/cop/chef/redundant/double_compile_time.rb +4 -2
  187. data/lib/rubocop/cop/chef/redundant/grouping_metadata.rb +1 -1
  188. data/lib/rubocop/cop/chef/redundant/long_description_metadata.rb +1 -1
  189. data/lib/rubocop/cop/chef/redundant/multiple_platform_checks.rb +2 -2
  190. data/lib/rubocop/cop/chef/redundant/name_property_and_required.rb +2 -3
  191. data/lib/rubocop/cop/chef/redundant/ohai_attribute_to_string.rb +2 -2
  192. data/lib/rubocop/cop/chef/redundant/property_splat_regex.rb +2 -2
  193. data/lib/rubocop/cop/chef/redundant/property_with_default_and_required.rb +2 -2
  194. data/lib/rubocop/cop/chef/redundant/provides_metadata.rb +1 -1
  195. data/lib/rubocop/cop/chef/redundant/recipe_metadata.rb +1 -1
  196. data/lib/rubocop/cop/chef/redundant/replaces_metadata.rb +1 -1
  197. data/lib/rubocop/cop/chef/redundant/resource_with_nothing_action.rb +1 -1
  198. data/lib/rubocop/cop/chef/redundant/sensitive_property_in_resource.rb +3 -1
  199. data/lib/rubocop/cop/chef/redundant/string_property_with_nil_default.rb +2 -2
  200. data/lib/rubocop/cop/chef/redundant/suggests_metadata.rb +1 -1
  201. data/lib/rubocop/cop/chef/redundant/unnecessary_desired_state.rb +2 -2
  202. data/lib/rubocop/cop/chef/redundant/unnecessary_name_property.rb +1 -1
  203. data/lib/rubocop/cop/chef/redundant/use_create_if_missing.rb +2 -2
  204. data/lib/rubocop/cop/chef/sharing/default_maintainer_metadata.rb +2 -2
  205. data/lib/rubocop/cop/chef/sharing/empty_metadata_field.rb +2 -2
  206. data/lib/rubocop/cop/chef/sharing/include_property_descriptions.rb +2 -2
  207. data/lib/rubocop/cop/chef/sharing/include_resource_descriptions.rb +1 -1
  208. data/lib/rubocop/cop/chef/sharing/include_resource_examples.rb +1 -1
  209. data/lib/rubocop/cop/chef/sharing/insecure_cookbook_url.rb +2 -2
  210. data/lib/rubocop/cop/chef/sharing/invalid_license_string.rb +57 -3
  211. data/lib/rubocop/cop/chef/style/attribute_keys.rb +4 -4
  212. data/lib/rubocop/cop/chef/style/chef_whaaat.rb +2 -2
  213. data/lib/rubocop/cop/chef/style/comments_copyright_format.rb +9 -9
  214. data/lib/rubocop/cop/chef/style/comments_default_copyright.rb +2 -2
  215. data/lib/rubocop/cop/chef/style/comments_format.rb +2 -2
  216. data/lib/rubocop/cop/chef/style/file_mode.rb +2 -2
  217. data/lib/rubocop/cop/chef/style/immediate_notification_timing.rb +2 -2
  218. data/lib/rubocop/cop/chef/style/include_recipe_with_parentheses.rb +2 -2
  219. data/lib/rubocop/cop/chef/style/negating_only_if.rb +2 -2
  220. data/lib/rubocop/cop/chef/style/overly_complex_supports_depends_metadata.rb +2 -2
  221. data/lib/rubocop/cop/chef/style/simplify_platform_major_version_check.rb +2 -2
  222. data/lib/rubocop/cop/chef/style/true_false_resource_properties.rb +2 -2
  223. data/lib/rubocop/cop/chef/style/unnecessary_os_check.rb +2 -2
  224. data/lib/rubocop/cop/chef/style/unnecessary_platform_case_statement.rb +2 -2
  225. data/lib/rubocop/cop/chef/style/use_platform_helpers.rb +2 -2
  226. metadata +5 -5
@@ -9,6 +9,8 @@ Bundler/InsecureProtocolSource:
9
9
  Enabled: false
10
10
  Bundler/OrderedGems:
11
11
  Enabled: false
12
+ Gemspec/DateAssignment:
13
+ Enabled: false
12
14
  Gemspec/DuplicatedAssignment:
13
15
  Enabled: false
14
16
  Gemspec/OrderedDependencies:
@@ -229,6 +231,8 @@ Lint/Debugger:
229
231
  Enabled: false
230
232
  Lint/DeprecatedClassMethods:
231
233
  Enabled: false
234
+ Lint/DeprecatedConstants:
235
+ Enabled: false
232
236
  Lint/DeprecatedOpenSSLConstant:
233
237
  Enabled: false
234
238
  Lint/DisjunctiveAssignmentInConstructor:
@@ -295,6 +299,8 @@ Lint/IneffectiveAccessModifier:
295
299
  Enabled: false
296
300
  Lint/InterpolationCheck:
297
301
  Enabled: false
302
+ Lint/LambdaWithoutLiteralBlock:
303
+ Enabled: false
298
304
  Lint/LiteralAsCondition:
299
305
  Enabled: false
300
306
  Lint/LiteralInInterpolation:
@@ -323,6 +329,10 @@ Lint/NonLocalExitFromIterator:
323
329
  Enabled: false
324
330
  Lint/NumberConversion:
325
331
  Enabled: false
332
+ Lint/NumberedParameterAssignment:
333
+ Enabled: false
334
+ Lint/OrAssignmentToConstant:
335
+ Enabled: false
326
336
  Lint/OrderedMagicComments:
327
337
  Enabled: false
328
338
  Lint/OutOfRangeRegexpRef:
@@ -341,6 +351,8 @@ Lint/RedundantCopDisableDirective:
341
351
  Enabled: false
342
352
  Lint/RedundantCopEnableDirective:
343
353
  Enabled: false
354
+ Lint/RedundantDirGlobSort:
355
+ Enabled: false
344
356
  Lint/RedundantRequireStatement:
345
357
  Enabled: false
346
358
  Lint/RedundantSafeNavigation:
@@ -385,6 +397,8 @@ Lint/StructNewOverride:
385
397
  Enabled: false
386
398
  Lint/SuppressedException:
387
399
  Enabled: false
400
+ Lint/SymbolConversion:
401
+ Enabled: false
388
402
  Lint/Syntax:
389
403
  Enabled: false
390
404
  Lint/ToEnumArguments:
@@ -395,6 +409,8 @@ Lint/TopLevelReturnWithArgument:
395
409
  Enabled: false
396
410
  Lint/TrailingCommaInAttributeDeclaration:
397
411
  Enabled: false
412
+ Lint/TripleQuotes:
413
+ Enabled: false
398
414
  Lint/UnderscorePrefixedVariableName:
399
415
  Enabled: false
400
416
  Lint/UnexpectedBlockArity:
@@ -583,6 +599,8 @@ Style/EmptyLiteral:
583
599
  Enabled: false
584
600
  Style/EmptyMethod:
585
601
  Enabled: false
602
+ Style/EndlessMethod:
603
+ Enabled: false
586
604
  Style/Encoding:
587
605
  Enabled: false
588
606
  Style/EndBlock:
@@ -615,6 +633,8 @@ Style/GuardClause:
615
633
  Enabled: false
616
634
  Style/HashAsLastArrayItem:
617
635
  Enabled: false
636
+ Style/HashConversion:
637
+ Enabled: false
618
638
  Style/HashEachMethods:
619
639
  Enabled: false
620
640
  Style/HashExcept:
@@ -635,6 +655,8 @@ Style/IfUnlessModifier:
635
655
  Enabled: false
636
656
  Style/IfUnlessModifierOfIfUnless:
637
657
  Enabled: false
658
+ Style/IfWithBooleanLiteralBranches:
659
+ Enabled: false
638
660
  Style/IfWithSemicolon:
639
661
  Enabled: false
640
662
  Style/ImplicitRuntimeError:
data/config/upstream.yml CHANGED
@@ -132,12 +132,13 @@ AllCops:
132
132
  # If a value is specified for TargetRubyVersion then it is used. Acceptable
133
133
  # values are specificed as a float (i.e. 2.5); the teeny version of Ruby
134
134
  # should not be included. If the project specifies a Ruby version in the
135
- # .ruby-version file, Gemfile or gems.rb file, RuboCop will try to determine
136
- # the desired version of Ruby by inspecting the .ruby-version file first,
137
- # followed by the Gemfile.lock or gems.locked file. (Although the Ruby version
138
- # is specified in the Gemfile or gems.rb file, RuboCop reads the final value
139
- # from the lock file.) If the Ruby version is still unresolved, RuboCop will
140
- # use the oldest officially supported Ruby version (currently Ruby 2.4).
135
+ # .tool-versions or .ruby-version files, Gemfile or gems.rb file, RuboCop will
136
+ # try to determine the desired version of Ruby by inspecting the
137
+ # .tool-versions file first, then .ruby-version, followed by the Gemfile.lock
138
+ # or gems.locked file. (Although the Ruby version is specified in the Gemfile
139
+ # or gems.rb file, RuboCop reads the final value from the lock file.) If the
140
+ # Ruby version is still unresolved, RuboCop will use the oldest officially
141
+ # supported Ruby version (currently Ruby 2.4).
141
142
  TargetRubyVersion: ~
142
143
  # Determines if a notification for extension libraries should be shown when
143
144
  # rubocop is run. Keys are the name of the extension, and values are an array
@@ -202,6 +203,13 @@ Bundler/OrderedGems:
202
203
 
203
204
  #################### Gemspec ###############################
204
205
 
206
+ Gemspec/DateAssignment:
207
+ Description: 'Checks that `date =` is not used in gemspec file, it is set automatically when the gem is packaged.'
208
+ Enabled: pending
209
+ VersionAdded: '1.10'
210
+ Include:
211
+ - '**/*.gemspec'
212
+
205
213
  Gemspec/DuplicatedAssignment:
206
214
  Description: 'An attribute assignment method calls should be listed only once in a gemspec.'
207
215
  Enabled: true
@@ -1197,7 +1205,6 @@ Layout/SpaceBeforeBrackets:
1197
1205
  StyleGuide: '#space-in-brackets-access'
1198
1206
  Enabled: pending
1199
1207
  VersionAdded: '1.7'
1200
- Safe: false
1201
1208
 
1202
1209
  Layout/SpaceBeforeComma:
1203
1210
  Description: 'No spaces before commas.'
@@ -1446,29 +1453,65 @@ Lint/Debugger:
1446
1453
  Description: 'Check for debugger calls.'
1447
1454
  Enabled: true
1448
1455
  VersionAdded: '0.14'
1449
- VersionChanged: '0.49'
1450
- DebuggerReceivers:
1451
- - binding
1452
- - Kernel
1453
- - Pry
1456
+ VersionChanged: '1.10'
1457
+ DebuggerReceivers: [] # deprecated
1454
1458
  DebuggerMethods:
1455
- - debugger
1456
- - byebug
1457
- - remote_byebug
1458
- - pry
1459
- - remote_pry
1460
- - pry_remote
1461
- - console
1462
- - rescue
1463
- - save_and_open_page
1464
- - save_and_open_screenshot
1465
- - irb
1459
+ # Groups are available so that a specific group can be disabled in
1460
+ # a user's configuration, but are otherwise not significant.
1461
+ Kernel:
1462
+ - binding.irb
1463
+ Byebug:
1464
+ - byebug
1465
+ - remote_byebug
1466
+ - Kernel.byebug
1467
+ - Kernel.remote_byebug
1468
+ Capybara:
1469
+ - save_and_open_page
1470
+ - save_and_open_screenshot
1471
+ Pry:
1472
+ - binding.pry
1473
+ - binding.remote_pry
1474
+ - binding.pry_remote
1475
+ - Pry.rescue
1476
+ Rails:
1477
+ - debugger
1478
+ - Kernel.debugger
1479
+ WebConsole:
1480
+ - binding.console
1466
1481
 
1467
1482
  Lint/DeprecatedClassMethods:
1468
1483
  Description: 'Check for deprecated class method calls.'
1469
1484
  Enabled: true
1470
1485
  VersionAdded: '0.19'
1471
1486
 
1487
+ Lint/DeprecatedConstants:
1488
+ Description: 'Checks for deprecated constants.'
1489
+ Enabled: pending
1490
+ VersionAdded: '1.8'
1491
+ # You can configure deprecated constants.
1492
+ # If there is an alternative method, you can set alternative value as `Alternative`.
1493
+ # And you can set the deprecated version as `DeprecatedVersion`.
1494
+ # These options can be omitted if they are not needed.
1495
+ #
1496
+ # DeprecatedConstants:
1497
+ # 'DEPRECATED_CONSTANT':
1498
+ # Alternative: 'alternative_value'
1499
+ # DeprecatedVersion: 'deprecated_version'
1500
+ #
1501
+ DeprecatedConstants:
1502
+ 'NIL':
1503
+ Alternative: 'nil'
1504
+ DeprecatedVersion: '2.4'
1505
+ 'TRUE':
1506
+ Alternative: 'true'
1507
+ DeprecatedVersion: '2.4'
1508
+ 'FALSE':
1509
+ Alternative: 'false'
1510
+ DeprecatedVersion: '2.4'
1511
+ 'Random::DEFAULT':
1512
+ Alternative: 'Random.new'
1513
+ DeprecatedVersion: '3.0'
1514
+
1472
1515
  Lint/DeprecatedOpenSSLConstant:
1473
1516
  Description: "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`."
1474
1517
  Enabled: true
@@ -1674,6 +1717,11 @@ Lint/InterpolationCheck:
1674
1717
  VersionAdded: '0.50'
1675
1718
  VersionChanged: '0.87'
1676
1719
 
1720
+ Lint/LambdaWithoutLiteralBlock:
1721
+ Description: 'Checks uses of lambda without a literal block.'
1722
+ Enabled: pending
1723
+ VersionAdded: '1.8'
1724
+
1677
1725
  Lint/LiteralAsCondition:
1678
1726
  Description: 'Checks of literals used in conditions.'
1679
1727
  Enabled: true
@@ -1773,6 +1821,17 @@ Lint/NumberConversion:
1773
1821
  - Time
1774
1822
  - DateTime
1775
1823
 
1824
+ Lint/NumberedParameterAssignment:
1825
+ Description: 'Checks for uses of numbered parameter assignment.'
1826
+ Enabled: pending
1827
+ VersionAdded: '1.9'
1828
+
1829
+ Lint/OrAssignmentToConstant:
1830
+ Description: 'Checks unintended or-assignment to constant.'
1831
+ Enabled: pending
1832
+ Safe: false
1833
+ VersionAdded: '1.9'
1834
+
1776
1835
  Lint/OrderedMagicComments:
1777
1836
  Description: 'Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.'
1778
1837
  Enabled: true
@@ -1836,6 +1895,11 @@ Lint/RedundantCopEnableDirective:
1836
1895
  Enabled: true
1837
1896
  VersionAdded: '0.76'
1838
1897
 
1898
+ Lint/RedundantDirGlobSort:
1899
+ Description: 'Checks for redundant `sort` method to `Dir.glob` and `Dir[]`.'
1900
+ Enabled: pending
1901
+ VersionAdded: '1.8'
1902
+
1839
1903
  Lint/RedundantRequireStatement:
1840
1904
  Description: 'Checks for unnecessary `require` statement.'
1841
1905
  Enabled: true
@@ -1994,12 +2058,16 @@ Lint/SuppressedException:
1994
2058
  VersionAdded: '0.9'
1995
2059
  VersionChanged: '0.81'
1996
2060
 
2061
+ Lint/SymbolConversion:
2062
+ Description: 'Checks for unnecessary symbol conversions.'
2063
+ Enabled: pending
2064
+ VersionAdded: '1.9'
2065
+
1997
2066
  Lint/Syntax:
1998
- Description: 'Checks syntax error.'
2067
+ Description: 'Checks for syntax errors.'
1999
2068
  Enabled: true
2000
2069
  VersionAdded: '0.9'
2001
2070
 
2002
-
2003
2071
  Lint/ToEnumArguments:
2004
2072
  Description: 'This cop ensures that `to_enum`/`enum_for`, called for the current method, has correct arguments.'
2005
2073
  Enabled: pending
@@ -2020,6 +2088,11 @@ Lint/TrailingCommaInAttributeDeclaration:
2020
2088
  Enabled: true
2021
2089
  VersionAdded: '0.90'
2022
2090
 
2091
+ Lint/TripleQuotes:
2092
+ Description: 'Checks for useless triple quote constructs.'
2093
+ Enabled: pending
2094
+ VersionAdded: '1.9'
2095
+
2023
2096
  Lint/UnderscorePrefixedVariableName:
2024
2097
  Description: 'Do not use prefix `_` for a variable that is used.'
2025
2098
  Enabled: true
@@ -2502,10 +2575,12 @@ Naming/VariableName:
2502
2575
  StyleGuide: '#snake-case-symbols-methods-vars'
2503
2576
  Enabled: true
2504
2577
  VersionAdded: '0.50'
2578
+ VersionChanged: '1.8'
2505
2579
  EnforcedStyle: snake_case
2506
2580
  SupportedStyles:
2507
2581
  - snake_case
2508
2582
  - camelCase
2583
+ AllowedIdentifiers: []
2509
2584
 
2510
2585
  Naming/VariableNumber:
2511
2586
  Description: 'Use the configured style when numbering symbols, methods and variables.'
@@ -2649,7 +2724,8 @@ Style/AsciiComments:
2649
2724
  Enabled: true
2650
2725
  VersionAdded: '0.9'
2651
2726
  VersionChanged: '0.52'
2652
- AllowedChars: []
2727
+ AllowedChars:
2728
+ - ©
2653
2729
 
2654
2730
  Style/Attr:
2655
2731
  Description: 'Checks for uses of Module#attr.'
@@ -3026,6 +3102,8 @@ Style/ConstantVisibility:
3026
3102
  visibility declarations.
3027
3103
  Enabled: false
3028
3104
  VersionAdded: '0.66'
3105
+ VersionChanged: '1.10'
3106
+ IgnoreModules: false
3029
3107
 
3030
3108
  # Checks that you have put a copyright in a comment before any code.
3031
3109
  #
@@ -3080,6 +3158,8 @@ Style/DisableCopsWithinSourceCodeDirective:
3080
3158
  Forbids disabling/enabling cops within source code.
3081
3159
  Enabled: false
3082
3160
  VersionAdded: '0.82'
3161
+ VersionChanged: '1.9'
3162
+ AllowedCops: []
3083
3163
 
3084
3164
  Style/DocumentDynamicEvalDefinition:
3085
3165
  Description: >-
@@ -3197,6 +3277,17 @@ Style/EndBlock:
3197
3277
  VersionAdded: '0.9'
3198
3278
  VersionChanged: '0.81'
3199
3279
 
3280
+ Style/EndlessMethod:
3281
+ Description: 'Avoid the use of multi-lined endless method definitions.'
3282
+ StyleGuide: '#endless-methods'
3283
+ Enabled: pending
3284
+ VersionAdded: '1.8'
3285
+ EnforcedStyle: allow_single_line
3286
+ SupportedStyles:
3287
+ - allow_single_line
3288
+ - allow_always
3289
+ - disallow
3290
+
3200
3291
  Style/EvalWithLocation:
3201
3292
  Description: 'Pass `__FILE__` and `__LINE__` to `eval` method, as they are used by backtraces.'
3202
3293
  Enabled: true
@@ -3220,9 +3311,8 @@ Style/ExplicitBlockArgument:
3220
3311
  that just passes its arguments to another block.
3221
3312
  StyleGuide: '#block-argument'
3222
3313
  Enabled: true
3223
- # May change the yielding arity.
3224
- Safe: false
3225
3314
  VersionAdded: '0.89'
3315
+ VersionChanged: '1.8'
3226
3316
 
3227
3317
  Style/ExponentialNotation:
3228
3318
  Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
@@ -3241,7 +3331,8 @@ Style/FloatDivision:
3241
3331
  Reference: 'https://blog.rubystyle.guide/ruby/2019/06/21/float-division.html'
3242
3332
  Enabled: true
3243
3333
  VersionAdded: '0.72'
3244
- VersionChanged: '1.6'
3334
+ VersionChanged: '1.9'
3335
+ Safe: false
3245
3336
  EnforcedStyle: single_coerce
3246
3337
  SupportedStyles:
3247
3338
  - left_coerce
@@ -3289,6 +3380,7 @@ Style/FormatStringToken:
3289
3380
  MaxUnannotatedPlaceholdersAllowed: 1
3290
3381
  VersionAdded: '0.49'
3291
3382
  VersionChanged: '1.0'
3383
+ IgnoredMethods: []
3292
3384
 
3293
3385
  Style/FrozenStringLiteralComment:
3294
3386
  Description: >-
@@ -3350,6 +3442,11 @@ Style/HashAsLastArrayItem:
3350
3442
  - braces
3351
3443
  - no_braces
3352
3444
 
3445
+ Style/HashConversion:
3446
+ Description: 'Avoid Hash[] in favor of ary.to_h or literal hashes.'
3447
+ Enabled: pending
3448
+ VersionAdded: '1.10'
3449
+
3353
3450
  Style/HashEachMethods:
3354
3451
  Description: 'Use Hash#each_key and Hash#each_value.'
3355
3452
  StyleGuide: '#hash-each'
@@ -3442,6 +3539,14 @@ Style/IfUnlessModifierOfIfUnless:
3442
3539
  VersionAdded: '0.39'
3443
3540
  VersionChanged: '0.87'
3444
3541
 
3542
+ Style/IfWithBooleanLiteralBranches:
3543
+ Description: 'Checks for redundant `if` with boolean literal branches.'
3544
+ Enabled: pending
3545
+ VersionAdded: '1.9'
3546
+ SafeAutoCorrect: false
3547
+ AllowedMethods:
3548
+ - nonzero?
3549
+
3445
3550
  Style/IfWithSemicolon:
3446
3551
  Description: 'Do not use if x; .... Use the ternary operator instead.'
3447
3552
  StyleGuide: '#no-semicolon-ifs'
@@ -3726,7 +3831,8 @@ Style/MutableConstant:
3726
3831
  Description: 'Do not assign mutable objects to constants.'
3727
3832
  Enabled: true
3728
3833
  VersionAdded: '0.34'
3729
- VersionChanged: '0.65'
3834
+ VersionChanged: '1.8'
3835
+ SafeAutoCorrect: false
3730
3836
  EnforcedStyle: literals
3731
3837
  SupportedStyles:
3732
3838
  # literals: freeze literals assigned to constants
@@ -4330,7 +4436,7 @@ Style/SingleLineMethods:
4330
4436
  StyleGuide: '#no-single-line-methods'
4331
4437
  Enabled: true
4332
4438
  VersionAdded: '0.9'
4333
- VersionChanged: '1.7'
4439
+ VersionChanged: '1.8'
4334
4440
  AllowIfMethodIsEmpty: true
4335
4441
 
4336
4442
  Style/SlicingWithRange:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Cookstyle
3
- VERSION = "7.5.2" # rubocop: disable Style/StringLiterals
4
- RUBOCOP_VERSION = '1.7.0'
3
+ VERSION = "7.8.3" # rubocop: disable Style/StringLiterals
4
+ RUBOCOP_VERSION = '1.10.0'
5
5
  end
@@ -19,18 +19,18 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # 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.
22
+ # A resource guard (not_if/only_if) that is a string should not be wrapped in {}. Wrapping a guard string in {} causes it to be executed as Ruby code which will always returns true instead of a shell command that will actually run.
23
23
  #
24
24
  # @example
25
25
  #
26
- # # bad
26
+ # #### incorrect
27
27
  # template '/etc/foo' do
28
28
  # mode '0644'
29
29
  # source 'foo.erb'
30
30
  # only_if { 'test -f /etc/foo' }
31
31
  # end
32
32
  #
33
- # # good
33
+ # #### correct
34
34
  # template '/etc/foo' do
35
35
  # mode '0644'
36
36
  # source 'foo.erb'
@@ -40,7 +40,7 @@ module RuboCop
40
40
  class BlockGuardWithOnlyString < Base
41
41
  extend AutoCorrector
42
42
 
43
- MSG = '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.'
43
+ MSG = 'A resource guard (not_if/only_if) that is a string should not be wrapped in {}. Wrapping a guard string in {} causes it to be executed as Ruby code which will always returns true instead of a shell command that will actually run.'
44
44
 
45
45
  def_node_matcher :block_guard_with_only_string?, <<-PATTERN
46
46
  (block (send nil? ${:not_if :only_if}) (args) (str $_) )
@@ -23,10 +23,10 @@ module RuboCop
23
23
  #
24
24
  # @example
25
25
  #
26
- # # bad
26
+ # #### incorrect
27
27
  # Chef::Application.fatal!('Something horrible happened!')
28
28
  #
29
- # # good
29
+ # #### correct
30
30
  # raise "Something horrible happened!"
31
31
  #
32
32
  class ChefApplicationFatal < Base