cookstyle 7.9.0 → 7.12.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/config/cookstyle.yml +24 -7
  3. data/config/disable_all.yml +8 -0
  4. data/config/upstream.yml +47 -3
  5. data/cookstyle.gemspec +1 -1
  6. data/lib/cookstyle.rb +1 -1
  7. data/lib/cookstyle/version.rb +2 -2
  8. data/lib/rubocop/cop/chef/correctness/block_guard_clause_string_only.rb +2 -2
  9. data/lib/rubocop/cop/chef/correctness/invalid_default_action.rb +10 -11
  10. data/lib/rubocop/cop/chef/correctness/invalid_platform_metadata.rb +1 -2
  11. data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_family_helper.rb +1 -1
  12. data/lib/rubocop/cop/chef/correctness/invalid_version_metadata.rb +0 -1
  13. data/lib/rubocop/cop/chef/correctness/lazy_eval_node_attribute_defaults.rb +0 -1
  14. data/lib/rubocop/cop/chef/correctness/metadata_missing_name.rb +9 -10
  15. data/lib/rubocop/cop/chef/correctness/node_normal.rb +2 -6
  16. data/lib/rubocop/cop/chef/correctness/node_normal_unless.rb +2 -6
  17. data/lib/rubocop/cop/chef/correctness/node_save.rb +1 -3
  18. data/lib/rubocop/cop/chef/correctness/notifies_action_not_symbol.rb +1 -2
  19. data/lib/rubocop/cop/chef/correctness/openssl_password_helpers.rb +1 -1
  20. data/lib/rubocop/cop/chef/correctness/resource_sets_internal_properties.rb +1 -3
  21. data/lib/rubocop/cop/chef/correctness/resource_sets_name_property.rb +0 -1
  22. data/lib/rubocop/cop/chef/correctness/resource_with_none_action.rb +0 -1
  23. data/lib/rubocop/cop/chef/correctness/scoped_file_exist.rb +1 -1
  24. data/lib/rubocop/cop/chef/correctness/service_resource.rb +0 -1
  25. data/lib/rubocop/cop/chef/correctness/supports_must_be_float.rb +0 -1
  26. data/lib/rubocop/cop/chef/correctness/tmp_path.rb +1 -2
  27. data/lib/rubocop/cop/chef/deprecation/cb_depends_on_self.rb +11 -12
  28. data/lib/rubocop/cop/chef/deprecation/chef_handler_recipe.rb +2 -3
  29. data/lib/rubocop/cop/chef/deprecation/chef_handler_supports.rb +1 -2
  30. data/lib/rubocop/cop/chef/deprecation/chef_rest.rb +1 -2
  31. data/lib/rubocop/cop/chef/deprecation/chef_rewind.rb +2 -3
  32. data/lib/rubocop/cop/chef/deprecation/chef_shellout.rb +2 -5
  33. data/lib/rubocop/cop/chef/deprecation/chef_sugar_helpers.rb +22 -23
  34. data/lib/rubocop/cop/chef/deprecation/chefdk_generators.rb +1 -2
  35. data/lib/rubocop/cop/chef/deprecation/cheffile.rb +2 -3
  36. data/lib/rubocop/cop/chef/deprecation/chefspec_coverage_report.rb +0 -1
  37. data/lib/rubocop/cop/chef/deprecation/chefspec_legacy_runner.rb +1 -2
  38. data/lib/rubocop/cop/chef/deprecation/chocolatey_package_uninstall_action.rb +1 -2
  39. data/lib/rubocop/cop/chef/deprecation/depends_compat_resource.rb +1 -1
  40. data/lib/rubocop/cop/chef/deprecation/depends_partial_search.rb +1 -1
  41. data/lib/rubocop/cop/chef/deprecation/deprecated_chefspec_platform.rb +1 -2
  42. data/lib/rubocop/cop/chef/deprecation/deprecated_mixins.rb +1 -2
  43. data/lib/rubocop/cop/chef/deprecation/deprecated_platform_methods.rb +1 -2
  44. data/lib/rubocop/cop/chef/deprecation/deprecated_shellout_methods.rb +1 -2
  45. data/lib/rubocop/cop/chef/deprecation/deprecated_windows_version_check.rb +1 -1
  46. data/lib/rubocop/cop/chef/deprecation/deprecated_yum_repository_actions.rb +1 -1
  47. data/lib/rubocop/cop/chef/deprecation/deprecated_yum_repository_properties.rb +1 -1
  48. data/lib/rubocop/cop/chef/deprecation/easy_install.rb +1 -2
  49. data/lib/rubocop/cop/chef/deprecation/eol_audit_mode.rb +2 -3
  50. data/lib/rubocop/cop/chef/deprecation/epic_fail.rb +2 -3
  51. data/lib/rubocop/cop/chef/deprecation/erl_call.rb +1 -2
  52. data/lib/rubocop/cop/chef/deprecation/execute_path_property.rb +0 -1
  53. data/lib/rubocop/cop/chef/deprecation/execute_relative_creates_without_cwd.rb +0 -1
  54. data/lib/rubocop/cop/chef/deprecation/hwrp_without_provides.rb +0 -1
  55. data/lib/rubocop/cop/chef/deprecation/hwrp_without_unified_mode_true.rb +86 -0
  56. data/lib/rubocop/cop/chef/deprecation/inherits_compat_resource.rb +0 -1
  57. data/lib/rubocop/cop/chef/deprecation/log_resource_notifications.rb +0 -1
  58. data/lib/rubocop/cop/chef/deprecation/macos_userdefaults_global_property.rb +0 -1
  59. data/lib/rubocop/cop/chef/deprecation/require_recipe.rb +0 -1
  60. data/lib/rubocop/cop/chef/deprecation/resource_without_unified_mode_true.rb +84 -0
  61. data/lib/rubocop/cop/chef/deprecation/ruby_27_keyword_argument_warnings.rb +0 -1
  62. data/lib/rubocop/cop/chef/deprecation/ruby_block_create_action.rb +0 -1
  63. data/lib/rubocop/cop/chef/deprecation/{ use_automatic_resource_name.rb → use_automatic_resource_name.rb} +0 -0
  64. data/lib/rubocop/cop/chef/deprecation/windows_package_installer_type_string.rb +0 -1
  65. data/lib/rubocop/cop/chef/effortless/berksfile.rb +0 -1
  66. data/lib/rubocop/cop/chef/effortless/chef_vault_used.rb +0 -2
  67. data/lib/rubocop/cop/chef/effortless/depends_chef_vault.rb +0 -2
  68. data/lib/rubocop/cop/chef/modernize/chef_gem_nokogiri.rb +0 -1
  69. data/lib/rubocop/cop/chef/modernize/foodcritic_comments.rb +0 -1
  70. data/lib/rubocop/cop/chef/modernize/includes_mixin_shellout.rb +0 -1
  71. data/lib/rubocop/cop/chef/modernize/libarchive_file.rb +0 -1
  72. data/lib/rubocop/cop/chef/modernize/resource_set_or_return.rb +0 -1
  73. data/lib/rubocop/cop/chef/modernize/resource_with_attributes.rb +0 -1
  74. data/lib/rubocop/cop/chef/modernize/seven_zip_archive.rb +0 -1
  75. data/lib/rubocop/cop/chef/modernize/shell_out_helper.rb +0 -1
  76. data/lib/rubocop/cop/chef/modernize/simplify_apt_ppa_setup.rb +0 -1
  77. data/lib/rubocop/cop/chef/modernize/unnecessary_mixlib_shellout_require.rb +0 -1
  78. data/lib/rubocop/cop/chef/modernize/zipfile_resource.rb +0 -1
  79. data/lib/rubocop/cop/chef/redundant/attribute_metadata.rb +0 -1
  80. data/lib/rubocop/cop/chef/redundant/conflicts_metadata.rb +0 -1
  81. data/lib/rubocop/cop/chef/redundant/custom_resource_with_allowed_actions.rb +0 -1
  82. data/lib/rubocop/cop/chef/redundant/grouping_metadata.rb +0 -1
  83. data/lib/rubocop/cop/chef/redundant/long_description_metadata.rb +0 -1
  84. data/lib/rubocop/cop/chef/redundant/multiple_platform_checks.rb +0 -1
  85. data/lib/rubocop/cop/chef/redundant/ohai_attribute_to_string.rb +0 -1
  86. data/lib/rubocop/cop/chef/redundant/provides_metadata.rb +0 -1
  87. data/lib/rubocop/cop/chef/redundant/recipe_metadata.rb +0 -1
  88. data/lib/rubocop/cop/chef/redundant/replaces_metadata.rb +0 -1
  89. data/lib/rubocop/cop/chef/redundant/suggests_metadata.rb +0 -1
  90. data/lib/rubocop/cop/chef/sharing/default_maintainer_metadata.rb +0 -1
  91. data/lib/rubocop/cop/chef/sharing/empty_metadata_field.rb +0 -1
  92. data/lib/rubocop/cop/chef/sharing/invalid_license_string.rb +0 -1
  93. data/lib/rubocop/cop/chef/style/attribute_keys.rb +0 -1
  94. data/lib/rubocop/cop/chef/style/chef_whaaat.rb +0 -1
  95. data/lib/rubocop/cop/chef/style/comment_sentence_spacing.rb +0 -1
  96. data/lib/rubocop/cop/chef/style/comments_copyright_format.rb +0 -1
  97. data/lib/rubocop/cop/chef/style/comments_default_copyright.rb +0 -1
  98. data/lib/rubocop/cop/chef/style/comments_format.rb +0 -1
  99. data/lib/rubocop/cop/chef/style/file_mode.rb +0 -1
  100. data/lib/rubocop/cop/chef/style/include_recipe_with_parentheses.rb +0 -1
  101. data/lib/rubocop/monkey_patches/{comment_config.rb → directive_comment.rb} +5 -4
  102. metadata +9 -7
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -14,7 +14,6 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
  #
17
-
18
17
  module RuboCop
19
18
  module Cop
20
19
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -14,7 +14,6 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
  #
17
-
18
17
  module RuboCop
19
18
  module Cop
20
19
  module Chef
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
-
19
18
  module RuboCop
20
19
  module Cop
21
20
  module Chef
@@ -2,10 +2,11 @@
2
2
  module RuboCop
3
3
  # we're monkey patching the config regex to allow for # cookstyle: disable whatever
4
4
  # in addition to the # rubocop: disable whatever that comes with RuboCop
5
- class CommentConfig
6
- remove_const('COMMENT_DIRECTIVE_REGEXP')
7
- COMMENT_DIRECTIVE_REGEXP = Regexp.new(
8
- "# (?:rubocop|cookstyle): ((?:disable|enable|todo))\\b #{COPS_PATTERN}".gsub(' ', '\s*')
5
+ class DirectiveComment
6
+ remove_const('DIRECTIVE_COMMENT_REGEXP')
7
+ DIRECTIVE_COMMENT_REGEXP = Regexp.new(
8
+ "# (?:rubocop|cookstyle) : ((?:disable|enable|todo))\\b #{COPS_PATTERN}"
9
+ .gsub(' ', '\s*')
9
10
  )
10
11
  end
11
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cookstyle
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.9.0
4
+ version: 7.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom May
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-03-08 00:00:00.000000000 Z
12
+ date: 2021-05-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubocop
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 1.11.0
20
+ version: 1.14.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 1.11.0
27
+ version: 1.14.0
28
28
  description:
29
29
  email:
30
30
  - thom@chef.io
@@ -85,7 +85,6 @@ files:
85
85
  - lib/rubocop/cop/chef/correctness/service_resource.rb
86
86
  - lib/rubocop/cop/chef/correctness/supports_must_be_float.rb
87
87
  - lib/rubocop/cop/chef/correctness/tmp_path.rb
88
- - lib/rubocop/cop/chef/deprecation/ use_automatic_resource_name.rb
89
88
  - lib/rubocop/cop/chef/deprecation/cb_depends_on_self.rb
90
89
  - lib/rubocop/cop/chef/deprecation/chef_handler_recipe.rb
91
90
  - lib/rubocop/cop/chef/deprecation/chef_handler_supports.rb
@@ -117,6 +116,7 @@ files:
117
116
  - lib/rubocop/cop/chef/deprecation/execute_relative_creates_without_cwd.rb
118
117
  - lib/rubocop/cop/chef/deprecation/foodcritic_testing.rb
119
118
  - lib/rubocop/cop/chef/deprecation/hwrp_without_provides.rb
119
+ - lib/rubocop/cop/chef/deprecation/hwrp_without_unified_mode_true.rb
120
120
  - lib/rubocop/cop/chef/deprecation/inherits_compat_resource.rb
121
121
  - lib/rubocop/cop/chef/deprecation/launchd_deprecated_hash_property.rb
122
122
  - lib/rubocop/cop/chef/deprecation/legacy_notify_syntax.rb
@@ -141,10 +141,12 @@ files:
141
141
  - lib/rubocop/cop/chef/deprecation/resource_uses_only_resource_name.rb
142
142
  - lib/rubocop/cop/chef/deprecation/resource_uses_provider_base_method.rb
143
143
  - lib/rubocop/cop/chef/deprecation/resource_uses_updated_method.rb
144
+ - lib/rubocop/cop/chef/deprecation/resource_without_unified_mode_true.rb
144
145
  - lib/rubocop/cop/chef/deprecation/ruby_27_keyword_argument_warnings.rb
145
146
  - lib/rubocop/cop/chef/deprecation/ruby_block_create_action.rb
146
147
  - lib/rubocop/cop/chef/deprecation/run_command_helper.rb
147
148
  - lib/rubocop/cop/chef/deprecation/search_uses_positional_parameters.rb
149
+ - lib/rubocop/cop/chef/deprecation/use_automatic_resource_name.rb
148
150
  - lib/rubocop/cop/chef/deprecation/use_inline_resources.rb
149
151
  - lib/rubocop/cop/chef/deprecation/use_yaml_dump.rb
150
152
  - lib/rubocop/cop/chef/deprecation/user_supports_property.rb
@@ -275,8 +277,8 @@ files:
275
277
  - lib/rubocop/cop/chef/style/use_platform_helpers.rb
276
278
  - lib/rubocop/cop/target_chef_version.rb
277
279
  - lib/rubocop/monkey_patches/base.rb
278
- - lib/rubocop/monkey_patches/comment_config.rb
279
280
  - lib/rubocop/monkey_patches/config.rb
281
+ - lib/rubocop/monkey_patches/directive_comment.rb
280
282
  - lib/rubocop/monkey_patches/registry_cop.rb
281
283
  - lib/rubocop/monkey_patches/team.rb
282
284
  homepage: https://docs.chef.io/workstation/cookstyle/
@@ -296,7 +298,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
296
298
  requirements:
297
299
  - - ">="
298
300
  - !ruby/object:Gem::Version
299
- version: '2.4'
301
+ version: '2.5'
300
302
  required_rubygems_version: !ruby/object:Gem::Requirement
301
303
  requirements:
302
304
  - - ">="