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
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>
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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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
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
Chef/Style/CommentFormat
- Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)Chef/Style/CommentFormat
- Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)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
Chef/Deprecations/ResourceWithoutUnifiedTrue
- Setunified_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)Chef/Modernize/PropertyWithNameAttribute
- Resource property sets name_attribute instead of name_property (https://docs.chef.io/workstation/cookstyle/chef_modernize_propertywithnameattribute)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
Chef/Deprecations/ResourceWithoutUnifiedTrue
- Setunified_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
Chef/Deprecations/ResourceWithoutUnifiedTrue
- Setunified_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)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
Chef/Deprecations/ResourceWithoutUnifiedTrue
- Setunified_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
Style/RedundantFileExtensionInRequire
- Redundant.rb
file extension detected. (https://rubystyle.guide#no-explicit-rb-to-require)