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.6.1 #20

Closed
wants to merge 1 commit into from

Commits on Jan 29, 2021

  1. Cookstyle Bot Auto Corrections with Cookstyle 7.6.1

    This change is automatically generated by the Cookstyle Bot using the latest version of Cookstyle (7.6.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/PercentLiteralDelimiters
      - **/Rakefile:27**: `%w`-literals should be delimited by `(` and `)`.
      - **/libraries/_junos_api_client.rb:65**: `%w`-literals should be delimited by `(` and `)`.
      - **/libraries/provider_group_junos.rb:77**: `%w`-literals should be delimited by `(` and `)`.
      - **/libraries/resource_interface.rb:105**: `%w`-literals should be delimited by `(` and `)`.
      - **/libraries/resource_interface.rb:120**: `%w`-literals should be delimited by `(` and `)`.
      - **/libraries/resource_lag.rb:95**: `%w`-literals should be delimited by `(` and `)`.
      - **/spec/unit/libraries/junos_api_client_spec.rb:55**: `%i`-literals should be delimited by `(` and `)`.
      - **/spec/unit/provider/l2_interface/junos_spec.rb:26**: `%w`-literals should be delimited by `(` and `)`.
      - **/spec/unit/provider/l2_interface/junos_spec.rb:34**: `%w`-literals should be delimited by `(` and `)`.
      - **/spec/unit/provider/lag/junos_spec.rb:24**: `%w`-literals should be delimited by `(` and `)`.
      - **/spec/unit/provider/lag/junos_spec.rb:33**: `%w`-literals should be delimited by `(` and `)`.
      - **/test/fixtures/cookbooks/group/attributes/default.rb:1**: `%w`-literals should be delimited by `(` and `)`.
      - **/test/fixtures/cookbooks/group/attributes/default.rb:1**: `%w`-literals should be delimited by `(` and `)`.
      - **/test/fixtures/cookbooks/group/attributes/default.rb:1**: `%w`-literals should be delimited by `(` and `)`.
      - **/test/fixtures/cookbooks/l2_interface/recipes/create.rb:20**: `%w`-literals should be delimited by `(` and `)`.
      - **/test/fixtures/cookbooks/lag/recipes/create.rb:28**: `%w`-literals should be delimited by `(` and `)`.
      - **/test/integration/lag/serverspec/lag_create_spec.rb:7**: `%w`-literals should be delimited by `(` and `)`.
    
    ### Chef/Style/CommentFormat
      - **/libraries/_helper.rb:2**: Properly format header comments
      - **/libraries/_junos_api_client.rb:2**: Properly format header comments
      - **/libraries/_junos_api_transaction_handler.rb:2**: Properly format header comments
      - **/libraries/_junos_api_transport.rb:2**: Properly format header comments
      - **/libraries/platform_provider_mapping.rb:2**: Properly format header comments
      - **/libraries/provider_group_junos.rb:2**: Properly format header comments
      - **/libraries/provider_group_junos.rb:5**: Properly format header comments
      - **/libraries/provider_interface_eos.rb:2**: Properly format header comments
      - **/libraries/provider_interface_eos.rb:5**: Properly format header comments
      - **/libraries/provider_interface_junos.rb:2**: Properly format header comments
      - **/libraries/provider_interface_junos.rb:5**: Properly format header comments
      - **/libraries/provider_l2_interface_eos.rb:2**: Properly format header comments
      - **/libraries/provider_l2_interface_eos.rb:5**: Properly format header comments
      - **/libraries/provider_l2_interface_junos.rb:2**: Properly format header comments
      - **/libraries/provider_l2_interface_junos.rb:5**: Properly format header comments
      - **/libraries/provider_lag_eos.rb:2**: Properly format header comments
      - **/libraries/provider_lag_eos.rb:5**: Properly format header comments
      - **/libraries/provider_lag_junos.rb:2**: Properly format header comments
      - **/libraries/provider_lag_junos.rb:5**: Properly format header comments
      - **/libraries/provider_vlan_eos.rb:2**: Properly format header comments
      - **/libraries/provider_vlan_eos.rb:5**: Properly format header comments
      - **/libraries/provider_vlan_junos.rb:2**: Properly format header comments
      - **/libraries/provider_vlan_junos.rb:5**: Properly format header comments
      - **/libraries/resource_group.rb:2**: Properly format header comments
      - **/libraries/resource_group.rb:5**: Properly format header comments
      - **/libraries/resource_group.rb:6**: Properly format header comments
      - **/libraries/resource_interface.rb:2**: Properly format header comments
      - **/libraries/resource_interface.rb:5**: Properly format header comments
      - **/libraries/resource_interface.rb:6**: Properly format header comments
      - **/libraries/resource_l2_interface.rb:2**: Properly format header comments
      - **/libraries/resource_l2_interface.rb:5**: Properly format header comments
      - **/libraries/resource_l2_interface.rb:6**: Properly format header comments
      - **/libraries/resource_lag.rb:2**: Properly format header comments
      - **/libraries/resource_lag.rb:5**: Properly format header comments
      - **/libraries/resource_lag.rb:6**: Properly format header comments
      - **/libraries/resource_vlan.rb:2**: Properly format header comments
      - **/libraries/resource_vlan.rb:5**: Properly format header comments
      - **/libraries/resource_vlan.rb:6**: Properly format header comments
      - **/spec/spec_helper.rb:2**: Properly format header comments
      - **/spec/support/shared_contexts/provider_junos.rb:2**: Properly format header comments
      - **/spec/unit/libraries/junos_api_client_spec.rb:2**: Properly format header comments
      - **/spec/unit/libraries/junos_api_transport_spec.rb:2**: Properly format header comments
      - **/spec/unit/provider/group/junos_spec.rb:2**: Properly format header comments
      - **/spec/unit/provider/interface/junos_spec.rb:2**: Properly format header comments
      - **/spec/unit/provider/l2_interface/junos_spec.rb:2**: Properly format header comments
      - **/spec/unit/provider/lag/junos_spec.rb:2**: Properly format header comments
      - **/spec/unit/provider/vlan/junos_spec.rb:2**: Properly format header comments
      - **/test/fixtures/cookbooks/interface/recipes/create.rb:2**: Properly format header comments
      - **/test/fixtures/cookbooks/interface/recipes/delete.rb:2**: Properly format header comments
      - **/test/fixtures/cookbooks/l2_interface/recipes/create.rb:2**: Properly format header comments
      - **/test/fixtures/cookbooks/l2_interface/recipes/delete.rb:2**: Properly format header comments
      - **/test/fixtures/cookbooks/lag/recipes/create.rb:2**: Properly format header comments
      - **/test/fixtures/cookbooks/lag/recipes/delete.rb:2**: Properly format header comments
      - **/test/fixtures/cookbooks/vlan/recipes/create.rb:2**: Properly format header comments
      - **/test/fixtures/cookbooks/vlan/recipes/delete.rb:2**: Properly format header comments
    
    ### Style/TrailingCommaInHashLiteral
      - **/libraries/_junos_api_client.rb:41**: Put a comma after the last item of a multiline hash.
    
    ### Layout/IndentationConsistency
      - **/libraries/_junos_api_client.rb:72**: Inconsistent indentation detected.
      - **/libraries/_junos_api_client.rb:72**: Inconsistent indentation detected.
      - **/libraries/_junos_api_client.rb:79**: Inconsistent indentation detected.
      - **/libraries/_junos_api_client.rb:150**: Inconsistent indentation detected.
      - **/libraries/resource_group.rb:35**: Inconsistent indentation detected.
      - **/libraries/resource_group.rb:35**: Inconsistent indentation detected.
      - **/libraries/resource_group.rb:37**: Inconsistent indentation detected.
      - **/libraries/resource_group.rb:37**: Inconsistent indentation detected.
      - **/libraries/resource_group.rb:41**: Inconsistent indentation detected.
      - **/libraries/resource_group.rb:44**: Inconsistent indentation detected.
      - **/libraries/resource_group.rb:46**: Inconsistent indentation detected.
      - **/libraries/resource_group.rb:49**: Inconsistent indentation detected.
      - **/libraries/resource_interface.rb:36**: Inconsistent indentation detected.
      - **/libraries/resource_interface.rb:36**: Inconsistent indentation detected.
      - **/libraries/resource_interface.rb:38**: Inconsistent indentation detected.
      - **/libraries/resource_interface.rb:38**: Inconsistent indentation detected.
      - **/libraries/resource_interface.rb:42**: Inconsistent indentation detected.
      - **/libraries/resource_interface.rb:45**: Inconsistent indentation detected.
      - **/libraries/resource_interface.rb:46**: Inconsistent indentation detected.
      - **/libraries/resource_interface.rb:47**: Inconsistent indentation detected.
      - **/libraries/resource_interface.rb:48**: Inconsistent indentation detected.
      - **/libraries/resource_interface.rb:49**: Inconsistent indentation detected.
      - **/libraries/resource_interface.rb:52**: Inconsistent indentation detected.
      - **/libraries/resource_l2_interface.rb:36**: Inconsistent indentation detected.
      - **/libraries/resource_l2_interface.rb:36**: Inconsistent indentation detected.
      - **/libraries/resource_l2_interface.rb:38**: Inconsistent indentation detected.
      - **/libraries/resource_l2_interface.rb:38**: Inconsistent indentation detected.
      - **/libraries/resource_l2_interface.rb:42**: Inconsistent indentation detected.
      - **/libraries/resource_l2_interface.rb:45**: Inconsistent indentation detected.
      - **/libraries/resource_l2_interface.rb:46**: Inconsistent indentation detected.
      - **/libraries/resource_l2_interface.rb:47**: Inconsistent indentation detected.
      - **/libraries/resource_l2_interface.rb:50**: Inconsistent indentation detected.
      - **/libraries/resource_lag.rb:36**: Inconsistent indentation detected.
      - **/libraries/resource_lag.rb:36**: Inconsistent indentation detected.
      - **/libraries/resource_lag.rb:38**: Inconsistent indentation detected.
      - **/libraries/resource_lag.rb:38**: Inconsistent indentation detected.
      - **/libraries/resource_lag.rb:42**: Inconsistent indentation detected.
      - **/libraries/resource_lag.rb:45**: Inconsistent indentation detected.
      - **/libraries/resource_lag.rb:46**: Inconsistent indentation detected.
      - **/libraries/resource_lag.rb:49**: Inconsistent indentation detected.
      - **/libraries/resource_vlan.rb:36**: Inconsistent indentation detected.
      - **/libraries/resource_vlan.rb:36**: Inconsistent indentation detected.
      - **/libraries/resource_vlan.rb:38**: Inconsistent indentation detected.
      - **/libraries/resource_vlan.rb:38**: Inconsistent indentation detected.
      - **/libraries/resource_vlan.rb:42**: Inconsistent indentation detected.
      - **/libraries/resource_vlan.rb:45**: Inconsistent indentation detected.
      - **/libraries/resource_vlan.rb:46**: Inconsistent indentation detected.
      - **/libraries/resource_vlan.rb:49**: Inconsistent indentation detected.
    
    ### Layout/IndentationWidth
      - **/libraries/_junos_api_client.rb:72**: Use 2 (not -4) spaces for indentation.
      - **/libraries/_junos_api_client.rb:72**: Use 2 (not 8) spaces for indentation.
      - **/libraries/_junos_api_client.rb:73**: Use 2 (not 8) spaces for indentation.
      - **/libraries/_junos_api_client.rb:149**: Use 2 (not -20) spaces for indentation.
      - **/libraries/resource_group.rb:35**: Use 2 (not -2) spaces for indentation.
      - **/libraries/resource_group.rb:35**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_group.rb:37**: Use 2 (not -2) spaces for indentation.
      - **/libraries/resource_group.rb:37**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_group.rb:38**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_interface.rb:36**: Use 2 (not -2) spaces for indentation.
      - **/libraries/resource_interface.rb:36**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_interface.rb:38**: Use 2 (not -2) spaces for indentation.
      - **/libraries/resource_interface.rb:38**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_interface.rb:39**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_l2_interface.rb:36**: Use 2 (not -2) spaces for indentation.
      - **/libraries/resource_l2_interface.rb:36**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_l2_interface.rb:38**: Use 2 (not -2) spaces for indentation.
      - **/libraries/resource_l2_interface.rb:38**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_l2_interface.rb:39**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_lag.rb:36**: Use 2 (not -2) spaces for indentation.
      - **/libraries/resource_lag.rb:36**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_lag.rb:38**: Use 2 (not -2) spaces for indentation.
      - **/libraries/resource_lag.rb:38**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_lag.rb:39**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_vlan.rb:36**: Use 2 (not -2) spaces for indentation.
      - **/libraries/resource_vlan.rb:36**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_vlan.rb:38**: Use 2 (not -2) spaces for indentation.
      - **/libraries/resource_vlan.rb:38**: Use 2 (not 6) spaces for indentation.
      - **/libraries/resource_vlan.rb:39**: Use 2 (not 6) spaces for indentation.
    
    ### Lint/UnusedMethodArgument
      - **/libraries/_junos_api_client.rb:72**: Unused method argument - `resource_name`. If it's necessary, use `_` or `_resource_name` as an argument name to indicate that it won't be used.
    
    ### Chef/Modernize/ResourceNameFromInitialize
      - **/libraries/_junos_api_client.rb:78**: The name of a resource can be set with the "resource_name" helper instead of using the initialize method.
      - **/libraries/resource_group.rb:36**: The name of a resource can be set with the "resource_name" helper instead of using the initialize method.
      - **/libraries/resource_interface.rb:37**: The name of a resource can be set with the "resource_name" helper instead of using the initialize method.
      - **/libraries/resource_l2_interface.rb:37**: The name of a resource can be set with the "resource_name" helper instead of using the initialize method.
      - **/libraries/resource_lag.rb:37**: The name of a resource can be set with the "resource_name" helper instead of using the initialize method.
      - **/libraries/resource_vlan.rb:37**: The name of a resource can be set with the "resource_name" helper instead of using the initialize method.
    
    ### Layout/DefEndAlignment
      - **/libraries/_junos_api_client.rb:80**: `end` at 80, 6 is not aligned with `def` at 72, 0.
      - **/libraries/resource_group.rb:50**: `end` at 50, 4 is not aligned with `def` at 37, 0.
      - **/libraries/resource_interface.rb:53**: `end` at 53, 4 is not aligned with `def` at 38, 0.
      - **/libraries/resource_l2_interface.rb:51**: `end` at 51, 4 is not aligned with `def` at 38, 0.
      - **/libraries/resource_lag.rb:50**: `end` at 50, 4 is not aligned with `def` at 38, 0.
      - **/libraries/resource_vlan.rb:50**: `end` at 50, 4 is not aligned with `def` at 38, 0.
    
    ### Layout/RescueEnsureAlignment
      - **/libraries/_junos_api_client.rb:147**: `rescue` at 147, 8 is not aligned with `begin` at 145, 30.
    
    ### Style/RedundantAssignment
      - **/libraries/_junos_api_client.rb:220**: Redundant assignment before returning detected.
    
    ### Layout/EmptyLinesAroundMethodBody
      - **/libraries/_junos_api_client.rb:231**: Extra empty line detected at method body end.
      - **/libraries/_junos_api_client.rb:232**: Extra empty line detected at method body end.
    
    ### Layout/EmptyLines
      - **/libraries/_junos_api_client.rb:232**: Extra blank line detected.
    
    ### Layout/TrailingWhitespace
      - **/libraries/_junos_api_client.rb:232**: Trailing whitespace detected.
    
    ### Chef/Style/UsePlatformHelpers
      - **/libraries/_junos_api_transaction_handler.rb:34**: Use platform? and platform_family? helpers to check a node's platform
    
    ### Chef/Modernize/WhyRunSupportedTrue
      - **/libraries/provider_group_junos.rb:34**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+
      - **/libraries/provider_interface_eos.rb:33**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+
      - **/libraries/provider_interface_junos.rb:34**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+
      - **/libraries/provider_l2_interface_eos.rb:33**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+
      - **/libraries/provider_l2_interface_junos.rb:34**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+
      - **/libraries/provider_lag_eos.rb:33**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+
      - **/libraries/provider_lag_junos.rb:34**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+
      - **/libraries/provider_vlan_eos.rb:33**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+
      - **/libraries/provider_vlan_junos.rb:34**: whyrun_supported? no longer needs to be set to true as it is the default in Chef Infra Client 13+
    
    ### Chef/Modernize/DefaultActionFromInitialize
      - **/libraries/resource_group.rb:39**: The default action of a resource can be set with the "default_action" helper instead of using the initialize method.
      - **/libraries/resource_interface.rb:40**: The default action of a resource can be set with the "default_action" helper instead of using the initialize method.
      - **/libraries/resource_l2_interface.rb:40**: The default action of a resource can be set with the "default_action" helper instead of using the initialize method.
      - **/libraries/resource_lag.rb:40**: The default action of a resource can be set with the "default_action" helper instead of using the initialize method.
      - **/libraries/resource_vlan.rb:40**: The default action of a resource can be set with the "default_action" helper instead of using the initialize method.
    
    ### Layout/CommentIndentation
      - **/libraries/resource_group.rb:40**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_group.rb:43**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_group.rb:48**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_interface.rb:41**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_interface.rb:44**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_interface.rb:51**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_l2_interface.rb:41**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_l2_interface.rb:44**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_l2_interface.rb:49**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_lag.rb:41**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_lag.rb:44**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_lag.rb:48**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_vlan.rb:41**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_vlan.rb:44**: Incorrect indentation detected (column 10 instead of 6).
      - **/libraries/resource_vlan.rb:48**: Incorrect indentation detected (column 10 instead of 6).
    
    ### Layout/EmptyLineBetweenDefs
      - **/libraries/resource_group.rb:90**: Use empty lines between class definitions.
    
    ### 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.
    
    ### Chef/RedundantCode/LongDescriptionMetadata
      - **/metadata.rb:6**: The long_description metadata.rb method is not used and is unnecessary in cookbooks.
    
    ### Chef/Modernize/RespondToInMetadata
      - **/metadata.rb:9**: It is no longer necessary to use respond_to? or defined? in metadata.rb in Chef Infra Client 12.15 and later
      - **/metadata.rb:10**: It is no longer necessary to use respond_to? or defined? in metadata.rb in Chef Infra Client 12.15 and later
    
    ### Style/ExpandPathArguments
      - **/spec/spec_helper.rb:20**: Use `expand_path('support/**/*.rb', __dir__)` instead of `expand_path('../support/**/*.rb', __FILE__)`.
      - **/spec/spec_helper.rb:25**: Use `expand_path('../libraries', __dir__)` instead of `expand_path('../../libraries', __FILE__)`.
    
    ### Chef/Style/AttributeKeys
      - **/spec/unit/provider/group/junos_spec.rb:32**: Use strings to access node attributes
      - **/spec/unit/provider/group/junos_spec.rb:32**: Use strings to access node attributes
      - **/test/fixtures/cookbooks/group/recipes/bgp_create.rb:4**: Use strings to access node attributes
      - **/test/fixtures/cookbooks/group/recipes/bgp_create.rb:4**: Use strings to access node attributes
      - **/test/fixtures/cookbooks/group/recipes/service_create.rb:4**: Use strings to access node attributes
      - **/test/fixtures/cookbooks/group/recipes/service_create.rb:4**: Use strings to access node attributes
      - **/test/fixtures/cookbooks/group/recipes/syslog_create.rb:4**: Use strings to access node attributes
      - **/test/fixtures/cookbooks/group/recipes/syslog_create.rb:4**: Use strings to access node attributes
    
    ### Style/StringLiterals
      - **/spec/unit/provider/group/junos_spec.rb:32**: Prefer single-quoted strings when you don't need string interpolation or special symbols.
      - **/spec/unit/provider/group/junos_spec.rb:32**: Prefer single-quoted strings when you don't need string interpolation or special symbols.
      - **/test/fixtures/cookbooks/group/recipes/bgp_create.rb:4**: Prefer single-quoted strings when you don't need string interpolation or special symbols.
      - **/test/fixtures/cookbooks/group/recipes/bgp_create.rb:4**: Prefer single-quoted strings when you don't need string interpolation or special symbols.
      - **/test/fixtures/cookbooks/group/recipes/service_create.rb:4**: Prefer single-quoted strings when you don't need string interpolation or special symbols.
      - **/test/fixtures/cookbooks/group/recipes/service_create.rb:4**: Prefer single-quoted strings when you don't need string interpolation or special symbols.
      - **/test/fixtures/cookbooks/group/recipes/syslog_create.rb:4**: Prefer single-quoted strings when you don't need string interpolation or special symbols.
      - **/test/fixtures/cookbooks/group/recipes/syslog_create.rb:4**: Prefer single-quoted strings when you don't need string interpolation or special symbols.
    
    Signed-off-by: Cookstyle <[email protected]>
    Cookstyle Bot committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    8b9b160 View commit details
    Browse the repository at this point in the history