Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated PR: Cookstyle Changes #12

Closed
wants to merge 3 commits into from
Closed

Conversation

kitchen-porter
Copy link
Contributor

Hey!
I ran Cookstyle 7.25.10 against this repo and here are the results.
This repo was selected due to the topics of chef-cookbook

Changes

Issues found and resolved with libraries/matchers.rb

Issues found and resolved with metadata.rb

Issues found and resolved with recipes/default.rb

Issues found and resolved with resources/execute.rb

Issues found and resolved with resources/installer.rb

Issues found and resolved with resources/package.rb

Issues found and resolved with resources/update.rb

Issues found and resolved with spec/unit/libraries/command_helper_spec.rb

Issues found and resolved with: libraries/matchers.rb

 - 1:1 refactor: Chef/Modernize/DefinesChefSpecMatchers - ChefSpec matchers are now auto generated by ChefSpec 7.1+ and do not need to be defined in a cookbook https://docs.chef.io/workstation/cookstyle/chef_modernize_defineschefspecmatchers

Issues found and resolved with: metadata.rb

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

Issues found and resolved with: recipes/default.rb

 - 2:1 refactor: Chef/Style/CommentFormat - Properly format header comments https://docs.chef.io/workstation/cookstyle/chef_style_commentformat
 - 5:1 refactor: Chef/Style/CommentFormat - Properly format header comments https://docs.chef.io/workstation/cookstyle/chef_style_commentformat
 - 7:1 refactor: Chef/Correctness/IncorrectLibraryInjection - Libraries should be injected into the Chef::DSL::Recipe class and not Chef::Recipe or Chef::Provider classes directly. https://docs.chef.io/workstation/cookstyle/chef_correctness_incorrectlibraryinjection

Issues found and resolved with: resources/execute.rb

 - 1:1 refactor: Chef/Deprecations/ResourceWithoutUnifiedTrue - Set unified_mode true in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 April 2022 when Unified Mode becomes the default. https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue
 - 12:1 refactor: Chef/Modernize/PropertyWithNameAttribute - Resource property sets name_attribute instead of name_property https://docs.chef.io/workstation/cookstyle/chef_modernize_propertywithnameattribute
 - 17:1 refactor: Chef/RedundantCode/SensitivePropertyInResource - Every Chef Infra resource already includes a sensitive property with a default value of false. https://docs.chef.io/workstation/cookstyle/chef_redundantcode_sensitivepropertyinresource

Issues found and resolved with: resources/installer.rb

 - 1:1 refactor: Chef/Deprecations/ResourceWithoutUnifiedTrue - Set unified_mode true in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 April 2022 when Unified Mode becomes the default. https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue

Issues found and resolved with: resources/package.rb

 - 1:1 refactor: Chef/Deprecations/ResourceWithoutUnifiedTrue - Set unified_mode true in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 April 2022 when Unified Mode becomes the default. https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue
 - 12:1 refactor: Chef/Modernize/PropertyWithNameAttribute - Resource property sets name_attribute instead of name_property https://docs.chef.io/workstation/cookstyle/chef_modernize_propertywithnameattribute

Issues found and resolved with: resources/update.rb

 - 1:1 refactor: Chef/Deprecations/ResourceWithoutUnifiedTrue - Set unified_mode true in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 April 2022 when Unified Mode becomes the default. https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue

Issues found and resolved with: spec/unit/libraries/command_helper_spec.rb

 - 2:58 convention: Style/RedundantFileExtensionInRequire - Redundant .rb file extension detected. https://rubystyle.guideno-explicit-rb-to-require

Signed-off-by: kitchen-porter <board@sous-chefs.org>
@kitchen-porter kitchen-porter requested a review from a team as a code owner December 2, 2021 00:10
Issues found and resolved with: resources/installer.rb

 - 14:5 refactor: Chef/RedundantCode/UseCreateIfMissing - Use the :create_if_missing action instead of not_if with a ::File.existFOO check. https://docs.chef.io/workstation/cookstyle/chef_redundantcode_usecreateifmissing
 - 18:5 refactor: Chef/RedundantCode/UseCreateIfMissing - Use the :create_if_missing action instead of not_if with a ::File.existFOO check. https://docs.chef.io/workstation/cookstyle/chef_redundantcode_usecreateifmissing

Signed-off-by: kitchen-porter <board@sous-chefs.org>
Issues found and resolved with: .delivery/project.toml

 - 2:8 convention: Style/StringLiterals - Prefer single-quoted strings when you don't need string interpolation or special symbols. https://rubystyle.guideconsistent-string-literals
 - 4:10 convention: Style/StringLiterals - Prefer single-quoted strings when you don't need string interpolation or special symbols. https://rubystyle.guideconsistent-string-literals
 - 5:13 convention: Style/StringLiterals - Prefer single-quoted strings when you don't need string interpolation or special symbols. https://rubystyle.guideconsistent-string-literals
 - 6:10 convention: Style/StringLiterals - Prefer single-quoted strings when you don't need string interpolation or special symbols. https://rubystyle.guideconsistent-string-literals
 - 7:9 convention: Style/StringLiterals - Prefer single-quoted strings when you don't need string interpolation or special symbols. https://rubystyle.guideconsistent-string-literals
 - 8:14 convention: Style/StringLiterals - Prefer single-quoted strings when you don't need string interpolation or special symbols. https://rubystyle.guideconsistent-string-literals
 - 9:11 convention: Style/StringLiterals - Prefer single-quoted strings when you don't need string interpolation or special symbols. https://rubystyle.guideconsistent-string-literals

Signed-off-by: kitchen-porter <board@sous-chefs.org>
@Stromweld Stromweld closed this May 6, 2024
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.

None yet

2 participants