Skip to content

Cookstyle Bot Auto Corrections with Cookstyle 7.31.1#7

Open
cookstyle[bot] wants to merge 1 commit intomainfrom
cookstyle_bot/cookstyle_7_31_1
Open

Cookstyle Bot Auto Corrections with Cookstyle 7.31.1#7
cookstyle[bot] wants to merge 1 commit intomainfrom
cookstyle_bot/cookstyle_7_31_1

Conversation

@cookstyle
Copy link

@cookstyle cookstyle bot commented Jan 26, 2022

This change is automatically generated by the Cookstyle Bot using the latest version of Cookstyle (7.31.1). Adopting changes suggested by Cookstyle improves cookbook readability, avoids common coding mistakes, and eases upgrades to newer versions of the Chef Infra Client.

Style/TrailingCommaInHashLiteral

  • /attributes/default.rb:2: Put a comma after the last item of a multiline hash.

Chef/Correctness/ChefApplicationFatal

Chef/Style/CommentFormat

Chef/Deprecations/UseInlineResourcesDefined

Chef/Modernize/WhyRunSupportedTrue

Chef/Deprecations/ResourceUsesOnlyResourceName

  • /libraries/packer_builder_resource.rb:21: Starting with Chef Infra Client 16, using resource_name without also using provides will result in resource failures. Make sure to use both resource_name and provides to change the name of the resource. You can also omit resource_name entirely if the value set matches the name Chef Infra Client automatically assigns based on COOKBOOKNAME_FILENAME. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourceusesonlyresourcename)
  • /libraries/packer_post_processor_resource.rb:23: Starting with Chef Infra Client 16, using resource_name without also using provides will result in resource failures. Make sure to use both resource_name and provides to change the name of the resource. You can also omit resource_name entirely if the value set matches the name Chef Infra Client automatically assigns based on COOKBOOKNAME_FILENAME. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourceusesonlyresourcename)
  • /libraries/packer_provisioner_resource.rb:21: Starting with Chef Infra Client 16, using resource_name without also using provides will result in resource failures. Make sure to use both resource_name and provides to change the name of the resource. You can also omit resource_name entirely if the value set matches the name Chef Infra Client automatically assigns based on COOKBOOKNAME_FILENAME. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourceusesonlyresourcename)
  • /libraries/packer_template_resource.rb:21: Starting with Chef Infra Client 16, using resource_name without also using provides will result in resource failures. Make sure to use both resource_name and provides to change the name of the resource. You can also omit resource_name entirely if the value set matches the name Chef Infra Client automatically assigns based on COOKBOOKNAME_FILENAME. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourceusesonlyresourcename)
  • /libraries/packer_variable_resource.rb:23: Starting with Chef Infra Client 16, using resource_name without also using provides will result in resource failures. Make sure to use both resource_name and provides to change the name of the resource. You can also omit resource_name entirely if the value set matches the name Chef Infra Client automatically assigns based on COOKBOOKNAME_FILENAME. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourceusesonlyresourcename)

Layout/IndentationConsistency

Layout/IndentationWidth

Chef/Sharing/InvalidLicenseString

Chef/RedundantCode/LongDescriptionMetadata

Style/StringLiterals

Layout/SpaceAroundOperators

Signed-off-by: Cookstyle cookbooks@chef.io

This change is automatically generated by the Cookstyle Bot using the latest version of Cookstyle (7.31.1). Adopting changes suggested by Cookstyle improves cookbook readability, avoids common coding mistakes, and eases upgrades to newer versions of the Chef Infra Client.

### Style/TrailingCommaInHashLiteral
  - **/attributes/default.rb:2**: Put a comma after the last item of a multiline hash.

### Chef/Correctness/ChefApplicationFatal
  - **/libraries/helpers.rb:77**: Use raise to force Chef Infra Client to fail instead of using Chef::Application.fatal (https://docs.chef.io/workstation/cookstyle/chef_correctness_chefapplicationfatal)

### Chef/Style/CommentFormat
  - **/libraries/packer_builder_provider.rb:3**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/packer_builder_resource.rb:3**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/packer_post_processor_provider.rb:3**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/packer_post_processor_resource.rb:3**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/packer_provisioner_provider.rb:3**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/packer_provisioner_resource.rb:3**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/packer_template_provider.rb:3**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/packer_template_resource.rb:3**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/packer_variable_provider.rb:3**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/packer_variable_resource.rb:3**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/default.rb:2**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/default.rb:5**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/spec/unit/recipes/default_spec.rb:2**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/spec/unit/recipes/default_spec.rb:5**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)

### Chef/Deprecations/UseInlineResourcesDefined
  - **/libraries/packer_builder_provider.rb:26**: use_inline_resources is now the default for resources in Chef Infra Client 13+ and does not need to be specified. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_useinlineresourcesdefined)
  - **/libraries/packer_post_processor_provider.rb:26**: use_inline_resources is now the default for resources in Chef Infra Client 13+ and does not need to be specified. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_useinlineresourcesdefined)
  - **/libraries/packer_provisioner_provider.rb:26**: use_inline_resources is now the default for resources in Chef Infra Client 13+ and does not need to be specified. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_useinlineresourcesdefined)
  - **/libraries/packer_template_provider.rb:26**: use_inline_resources is now the default for resources in Chef Infra Client 13+ and does not need to be specified. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_useinlineresourcesdefined)
  - **/libraries/packer_variable_provider.rb:27**: use_inline_resources is now the default for resources in Chef Infra Client 13+ and does not need to be specified. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_useinlineresourcesdefined)

### Chef/Modernize/WhyRunSupportedTrue
  - **/libraries/packer_builder_provider.rb:28**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+ (https://docs.chef.io/workstation/cookstyle/chef_modernize_whyrunsupportedtrue)
  - **/libraries/packer_post_processor_provider.rb:28**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+ (https://docs.chef.io/workstation/cookstyle/chef_modernize_whyrunsupportedtrue)
  - **/libraries/packer_provisioner_provider.rb:28**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+ (https://docs.chef.io/workstation/cookstyle/chef_modernize_whyrunsupportedtrue)
  - **/libraries/packer_template_provider.rb:28**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+ (https://docs.chef.io/workstation/cookstyle/chef_modernize_whyrunsupportedtrue)
  - **/libraries/packer_variable_provider.rb:29**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+ (https://docs.chef.io/workstation/cookstyle/chef_modernize_whyrunsupportedtrue)

### Chef/Deprecations/ResourceUsesOnlyResourceName
  - **/libraries/packer_builder_resource.rb:21**: Starting with Chef Infra Client 16, using `resource_name` without also using `provides` will result in resource failures. Make sure to use both `resource_name` and `provides` to change the name of the resource. You can also omit `resource_name` entirely if the value set matches the name Chef Infra Client automatically assigns based on COOKBOOKNAME_FILENAME. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourceusesonlyresourcename)
  - **/libraries/packer_post_processor_resource.rb:23**: Starting with Chef Infra Client 16, using `resource_name` without also using `provides` will result in resource failures. Make sure to use both `resource_name` and `provides` to change the name of the resource. You can also omit `resource_name` entirely if the value set matches the name Chef Infra Client automatically assigns based on COOKBOOKNAME_FILENAME. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourceusesonlyresourcename)
  - **/libraries/packer_provisioner_resource.rb:21**: Starting with Chef Infra Client 16, using `resource_name` without also using `provides` will result in resource failures. Make sure to use both `resource_name` and `provides` to change the name of the resource. You can also omit `resource_name` entirely if the value set matches the name Chef Infra Client automatically assigns based on COOKBOOKNAME_FILENAME. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourceusesonlyresourcename)
  - **/libraries/packer_template_resource.rb:21**: Starting with Chef Infra Client 16, using `resource_name` without also using `provides` will result in resource failures. Make sure to use both `resource_name` and `provides` to change the name of the resource. You can also omit `resource_name` entirely if the value set matches the name Chef Infra Client automatically assigns based on COOKBOOKNAME_FILENAME. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourceusesonlyresourcename)
  - **/libraries/packer_variable_resource.rb:23**: Starting with Chef Infra Client 16, using `resource_name` without also using `provides` will result in resource failures. Make sure to use both `resource_name` and `provides` to change the name of the resource. You can also omit `resource_name` entirely if the value set matches the name Chef Infra Client automatically assigns based on COOKBOOKNAME_FILENAME. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourceusesonlyresourcename)

### Layout/IndentationConsistency
  - **/libraries/packer_builder_resource.rb:22**: Inconsistent indentation detected. (https://rubystyle.guide#spaces-indentation, https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions)
  - **/libraries/packer_builder_resource.rb:22**: Inconsistent indentation detected. (https://rubystyle.guide#spaces-indentation, https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions)
  - **/libraries/packer_post_processor_resource.rb:24**: Inconsistent indentation detected. (https://rubystyle.guide#spaces-indentation, https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions)
  - **/libraries/packer_post_processor_resource.rb:24**: Inconsistent indentation detected. (https://rubystyle.guide#spaces-indentation, https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions)
  - **/libraries/packer_provisioner_resource.rb:22**: Inconsistent indentation detected. (https://rubystyle.guide#spaces-indentation, https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions)
  - **/libraries/packer_provisioner_resource.rb:22**: Inconsistent indentation detected. (https://rubystyle.guide#spaces-indentation, https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions)
  - **/libraries/packer_template_resource.rb:22**: Inconsistent indentation detected. (https://rubystyle.guide#spaces-indentation, https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions)
  - **/libraries/packer_template_resource.rb:22**: Inconsistent indentation detected. (https://rubystyle.guide#spaces-indentation, https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions)
  - **/libraries/packer_variable_resource.rb:24**: Inconsistent indentation detected. (https://rubystyle.guide#spaces-indentation, https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions)
  - **/libraries/packer_variable_resource.rb:24**: Inconsistent indentation detected. (https://rubystyle.guide#spaces-indentation, https://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions)

### Layout/IndentationWidth
  - **/libraries/packer_builder_resource.rb:22**: Use 2 (not -4) spaces for indentation. (https://rubystyle.guide#spaces-indentation)
  - **/libraries/packer_builder_resource.rb:22**: Use 2 (not 8) spaces for indentation. (https://rubystyle.guide#spaces-indentation)
  - **/libraries/packer_post_processor_resource.rb:24**: Use 2 (not -4) spaces for indentation. (https://rubystyle.guide#spaces-indentation)
  - **/libraries/packer_post_processor_resource.rb:24**: Use 2 (not 8) spaces for indentation. (https://rubystyle.guide#spaces-indentation)
  - **/libraries/packer_provisioner_resource.rb:22**: Use 2 (not -4) spaces for indentation. (https://rubystyle.guide#spaces-indentation)
  - **/libraries/packer_provisioner_resource.rb:22**: Use 2 (not 8) spaces for indentation. (https://rubystyle.guide#spaces-indentation)
  - **/libraries/packer_template_resource.rb:22**: Use 2 (not -4) spaces for indentation. (https://rubystyle.guide#spaces-indentation)
  - **/libraries/packer_template_resource.rb:22**: Use 2 (not 8) spaces for indentation. (https://rubystyle.guide#spaces-indentation)
  - **/libraries/packer_variable_resource.rb:24**: Use 2 (not -4) spaces for indentation. (https://rubystyle.guide#spaces-indentation)
  - **/libraries/packer_variable_resource.rb:24**: Use 2 (not 8) spaces for indentation. (https://rubystyle.guide#spaces-indentation)

### Chef/Sharing/InvalidLicenseString
  - **/metadata.rb:4**: Cookbook metadata.rb does not use a SPDX compliant license string or "all rights reserved". See https://spdx.org/licenses/ for a complete list of license identifiers. (https://docs.chef.io/workstation/cookstyle/chef_sharing_invalidlicensestring)

### Chef/RedundantCode/LongDescriptionMetadata
  - **/metadata.rb:6**: The long_description metadata.rb method is not used and is unnecessary in cookbooks. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_longdescriptionmetadata)

### Style/StringLiterals
  - **/test/fixtures/cookbooks/test/recipes/default.rb:1**: Prefer single-quoted strings when you don't need string interpolation or special symbols. (https://rubystyle.guide#consistent-string-literals)

### Layout/SpaceAroundOperators
  - **/test/fixtures/cookbooks/test/recipes/default.rb:14**: Surrounding space missing for operator `=>`. (https://rubystyle.guide#spaces-operators)

Signed-off-by: Cookstyle <cookbooks@chef.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants