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

Cookstyle Bot Auto Corrections with Cookstyle 7.31.1 #277

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cookstyle[bot]
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.

Chef/Style/CommentFormat

Style/PercentLiteralDelimiters

Chef/Style/UnnecessaryPlatformCaseStatement

Style/WordArray

Style/TrailingCommaInArrayLiteral

Chef/Style/UsePlatformHelpers

Layout/DotPosition

Chef/RedundantCode/LongDescriptionMetadata

Chef/RedundantCode/RecipeMetadata

Chef/RedundantCode/MultiplePlatformChecks

Chef/Style/IncludeRecipeWithParentheses

Chef/Correctness/IncorrectLibraryInjection

Style/TrailingCommaInHashLiteral

  • /spec/recipes/login_defs_spec.rb:55: Put a comma after the last item of a multiline hash.
  • /spec/recipes/securetty_spec.rb:33: Put a comma after the last item of a multiline hash.

Chef/Deprecations/ChefSpecCoverageReport

Layout/EmptyLines

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.

### Chef/Style/CommentFormat
  - **/attributes/default.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/attributes/default.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/attributes/default.rb:8**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/attributes/sysctl.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/attributes/sysctl.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/apt_package_extras.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/apt_package_extras.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/apt_package_extras.rb:8**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/cookbook_version.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/cookbook_version.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/cookbook_version.rb:8**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/gpgcheck.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/gpgcheck.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/gpgcheck.rb:8**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/helpers_param.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/helpers_param.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/helpers_param.rb:8**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/suid_sgid.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/suid_sgid.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/libraries/suid_sgid.rb:8**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/metadata.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/apt.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/apt.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/auditd.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/auditd.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/default.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/default.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/default.rb:8**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/limits.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/limits.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/login_defs.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/login_defs.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/minimize_access.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/minimize_access.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/packages.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/packages.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/pam.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/pam.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/pam.rb:8**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/profile.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/profile.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/securetty.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/securetty.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/securetty.rb:8**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/selinux.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/selinux.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/suid_sgid.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/suid_sgid.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/suid_sgid.rb:8**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/sysctl.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/sysctl.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/sysctl.rb:8**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/yum.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/recipes/yum.rb:7**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/spec/recipes/auditd_spec.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/spec/recipes/default_spec.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/spec/recipes/limits_spec.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/spec/recipes/login_defs_spec.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/spec/recipes/minimize_access_spec.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/spec/recipes/pam_spec.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/spec/recipes/profile_spec.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/spec/recipes/securetty_spec.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/spec/recipes/suid_sgid_spec.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/spec/recipes/sysctl_spec.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/spec/spec_helper.rb:4**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)
  - **/test/fixtures/cookbooks/test/recipes/default.rb:2**: Properly format header comments (https://docs.chef.io/workstation/cookstyle/chef_style_commentformat)

### Style/PercentLiteralDelimiters
  - **/attributes/default.rb:26**: `%w`-literals should be delimited by `(` and `)`. (https://rubystyle.guide#percent-literal-braces)
  - **/attributes/default.rb:79**: `%w`-literals should be delimited by `(` and `)`. (https://rubystyle.guide#percent-literal-braces)
  - **/attributes/default.rb:127**: `%w`-literals should be delimited by `(` and `)`. (https://rubystyle.guide#percent-literal-braces)
  - **/recipes/auditd.rb:25**: `%i`-literals should be delimited by `(` and `)`. (https://rubystyle.guide#percent-literal-braces)
  - **/recipes/minimize_access.rb:24**: `%w`-literals should be delimited by `(` and `)`. (https://rubystyle.guide#percent-literal-braces)
  - **/recipes/minimize_access.rb:75**: `%w`-literals should be delimited by `(` and `)`. (https://rubystyle.guide#percent-literal-braces)
  - **/recipes/yum.rb:46**: `%w`-literals should be delimited by `(` and `)`. (https://rubystyle.guide#percent-literal-braces)
  - **/spec/recipes/default_spec.rb:30**: `%w`-literals should be delimited by `(` and `)`. (https://rubystyle.guide#percent-literal-braces)
  - **/spec/recipes/sysctl_spec.rb:375**: `%w`-literals should be delimited by `(` and `)`. (https://rubystyle.guide#percent-literal-braces)
  - **/spec/recipes/sysctl_spec.rb:383**: `%w`-literals should be delimited by `(` and `)`. (https://rubystyle.guide#percent-literal-braces)
  - **/spec/recipes/sysctl_spec.rb:386**: `%w`-literals should be delimited by `(` and `)`. (https://rubystyle.guide#percent-literal-braces)
  - **/spec/recipes/sysctl_spec.rb:397**: `%w`-literals should be delimited by `(` and `)`. (https://rubystyle.guide#percent-literal-braces)

### Chef/Style/UnnecessaryPlatformCaseStatement
  - **/attributes/default.rb:89**: Use the platform?() and platform_family?() helpers instead of a case statement that only includes a single when statement. (https://docs.chef.io/workstation/cookstyle/chef_style_unnecessaryplatformcasestatement)
  - **/attributes/default.rb:112**: Use the platform?() and platform_family?() helpers instead of a case statement that only includes a single when statement. (https://docs.chef.io/workstation/cookstyle/chef_style_unnecessaryplatformcasestatement)
  - **/attributes/sysctl.rb:95**: Use the platform?() and platform_family?() helpers instead of a case statement that only includes a single when statement. (https://docs.chef.io/workstation/cookstyle/chef_style_unnecessaryplatformcasestatement)
  - **/recipes/packages.rb:23**: Use the platform?() and platform_family?() helpers instead of a case statement that only includes a single when statement. (https://docs.chef.io/workstation/cookstyle/chef_style_unnecessaryplatformcasestatement)
  - **/recipes/packages.rb:29**: Use the platform?() and platform_family?() helpers instead of a case statement that only includes a single when statement. (https://docs.chef.io/workstation/cookstyle/chef_style_unnecessaryplatformcasestatement)
  - **/recipes/selinux.rb:24**: Use the platform?() and platform_family?() helpers instead of a case statement that only includes a single when statement. (https://docs.chef.io/workstation/cookstyle/chef_style_unnecessaryplatformcasestatement)
  - **/recipes/sysctl.rb:160**: Use the platform?() and platform_family?() helpers instead of a case statement that only includes a single when statement. (https://docs.chef.io/workstation/cookstyle/chef_style_unnecessaryplatformcasestatement)
  - **/recipes/sysctl.rb:176**: Use the platform?() and platform_family?() helpers instead of a case statement that only includes a single when statement. (https://docs.chef.io/workstation/cookstyle/chef_style_unnecessaryplatformcasestatement)

### Style/WordArray
  - **/attributes/default.rb:146**: Use `%w` or `%W` for an array of words. (https://rubystyle.guide#percent-w)
  - **/attributes/default.rb:148**: Use `%w` or `%W` for an array of words. (https://rubystyle.guide#percent-w)

### Style/TrailingCommaInArrayLiteral
  - **/attributes/default.rb:153**: Put a comma after the last item of a multiline array. (https://rubystyle.guide#no-trailing-array-commas)

### Chef/Style/UsePlatformHelpers
  - **/attributes/sysctl.rb:98**: Use platform? and platform_family? helpers to check a node's platform (https://docs.chef.io/workstation/cookstyle/chef_style_useplatformhelpers)
  - **/recipes/auditd.rb:26**: Use platform? and platform_family? helpers to check a node's platform (https://docs.chef.io/workstation/cookstyle/chef_style_useplatformhelpers)
  - **/recipes/auditd.rb:27**: Use platform? and platform_family? helpers to check a node's platform (https://docs.chef.io/workstation/cookstyle/chef_style_useplatformhelpers)
  - **/recipes/auditd.rb:28**: Use platform? and platform_family? helpers to check a node's platform (https://docs.chef.io/workstation/cookstyle/chef_style_useplatformhelpers)
  - **/recipes/default.rb:39**: Use platform? and platform_family? helpers to check a node's platform (https://docs.chef.io/workstation/cookstyle/chef_style_useplatformhelpers)
  - **/recipes/default.rb:39**: Use platform? and platform_family? helpers to check a node's platform (https://docs.chef.io/workstation/cookstyle/chef_style_useplatformhelpers)
  - **/recipes/minimize_access.rb:62**: Use platform? and platform_family? helpers to check a node's platform (https://docs.chef.io/workstation/cookstyle/chef_style_useplatformhelpers)
  - **/test/fixtures/cookbooks/test/recipes/default.rb:8**: Use platform? and platform_family? helpers to check a node's platform (https://docs.chef.io/workstation/cookstyle/chef_style_useplatformhelpers)

### Layout/DotPosition
  - **/libraries/suid_sgid.rb:49**: Place the . on the next line, together with the method name. (https://rubystyle.guide#consistent-multi-line-chains)
  - **/libraries/suid_sgid.rb:50**: Place the . on the next line, together with the method name. (https://rubystyle.guide#consistent-multi-line-chains)
  - **/recipes/sysctl.rb:141**: Place the . on the next line, together with the method name. (https://rubystyle.guide#consistent-multi-line-chains)
  - **/recipes/sysctl.rb:142**: Place the . on the next line, together with the method name. (https://rubystyle.guide#consistent-multi-line-chains)
  - **/spec/recipes/login_defs_spec.rb:61**: Place the . on the next line, together with the method name. (https://rubystyle.guide#consistent-multi-line-chains)
  - **/spec/recipes/login_defs_spec.rb:62**: Place the . on the next line, together with the method name. (https://rubystyle.guide#consistent-multi-line-chains)
  - **/spec/recipes/login_defs_spec.rb:63**: Place the . on the next line, together with the method name. (https://rubystyle.guide#consistent-multi-line-chains)
  - **/spec/recipes/login_defs_spec.rb:64**: Place the . on the next line, together with the method name. (https://rubystyle.guide#consistent-multi-line-chains)
  - **/spec/recipes/login_defs_spec.rb:65**: Place the . on the next line, together with the method name. (https://rubystyle.guide#consistent-multi-line-chains)
  - **/spec/recipes/sysctl_spec.rb:376**: Place the . on the next line, together with the method name. (https://rubystyle.guide#consistent-multi-line-chains)
  - **/spec/recipes/sysctl_spec.rb:387**: Place the . on the next line, together with the method name. (https://rubystyle.guide#consistent-multi-line-chains)
  - **/spec/recipes/sysctl_spec.rb:391**: Place the . on the next line, together with the method name. (https://rubystyle.guide#consistent-multi-line-chains)

### Chef/RedundantCode/LongDescriptionMetadata
  - **/metadata.rb:24**: The long_description metadata.rb method is not used and is unnecessary in cookbooks. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_longdescriptionmetadata)
  - **/test/fixtures/cookbooks/test/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)

### Chef/RedundantCode/RecipeMetadata
  - **/metadata.rb:41**: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata)
  - **/metadata.rb:42**: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata)
  - **/metadata.rb:43**: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata)
  - **/metadata.rb:44**: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata)
  - **/metadata.rb:45**: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata)
  - **/metadata.rb:46**: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata)
  - **/metadata.rb:47**: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata)
  - **/metadata.rb:48**: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata)
  - **/metadata.rb:49**: The recipe metadata.rb method is not used and is unnecessary in cookbooks. Recipes should be documented in the cookbook's README.md file instead. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_recipemetadata)

### Chef/RedundantCode/MultiplePlatformChecks
  - **/recipes/default.rb:39**: You can pass multiple values to the platform? and platform_family? helpers instead of calling the helpers multiple times. (https://docs.chef.io/workstation/cookstyle/chef_redundantcode_multipleplatformchecks)

### Chef/Style/IncludeRecipeWithParentheses
  - **/recipes/packages.rb:25**: There is no need to wrap the recipe in parentheses when using the include_recipe helper (https://docs.chef.io/workstation/cookstyle/#includerecipewithparentheses)
  - **/recipes/packages.rb:31**: There is no need to wrap the recipe in parentheses when using the include_recipe helper (https://docs.chef.io/workstation/cookstyle/#includerecipewithparentheses)

### Chef/Correctness/IncorrectLibraryInjection
  - **/recipes/sysctl.rb:23**: 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)

### Style/TrailingCommaInHashLiteral
  - **/spec/recipes/login_defs_spec.rb:55**: Put a comma after the last item of a multiline hash.
  - **/spec/recipes/securetty_spec.rb:33**: Put a comma after the last item of a multiline hash.

### Chef/Deprecations/ChefSpecCoverageReport
  - **/spec/spec_helper.rb:25**: Don't use the deprecated ChefSpec coverage report functionality in your specs. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_chefspeccoveragereport)

### Layout/EmptyLines
  - **/spec/spec_helper.rb:26**: Extra blank line detected. (https://rubystyle.guide#two-or-more-empty-lines)

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.

None yet

0 participants