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

rubocop: Fix Lint violations #307

Merged
merged 1 commit into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-05-05 08:24:59 UTC using RuboCop version 1.50.2.
# on 2023-05-05 08:45:15 UTC using RuboCop version 1.50.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down Expand Up @@ -31,21 +31,6 @@ Lint/SuppressedException:
- 'Rakefile'
- 'bin/beaker-hostgenerator'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
Lint/UnusedBlockArgument:
Exclude:
- 'lib/beaker-hostgenerator/data.rb'

# Offense count: 5
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
Lint/UnusedMethodArgument:
Exclude:
- 'lib/beaker-hostgenerator/hypervisor.rb'
- 'lib/beaker-hostgenerator/util.rb'

# Offense count: 11
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Expand Down
2 changes: 1 addition & 1 deletion lib/beaker-hostgenerator/data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def base_host_config(options)
'pe_ver' => options[:pe_ver] || pe_version,
'pe_upgrade_dir' => options[:pe_upgrade_dir] || pe_dir(pe_upgrade_version),
'pe_upgrade_ver' => options[:pe_upgrade_ver] || pe_upgrade_version,
}.reject { |key, value| value.nil? }
}.reject { |_key, value| value.nil? }
end

# This is where all the information for all platforms lives, irrespective
Expand Down
2 changes: 1 addition & 1 deletion lib/beaker-hostgenerator/hypervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def global_config()
#
# @param [Integer] bhg_version The version of OS info to use when building
# up the node definition.
def generate_node(node_info, base_config, bhg_version)
def generate_node(_node_info, _base_config, _bhg_version)
raise "Method 'generate_node' not implemented!"
end

Expand Down
4 changes: 2 additions & 2 deletions lib/beaker-hostgenerator/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module BeakerHostGenerator
module Utils
module_function

def pe_dir(version, family = nil)
def pe_dir(version, _family = nil)
BeakerHostGenerator::Data.pe_dir(version)
end

Expand All @@ -30,7 +30,7 @@ def dump_hosts(hosts, path)
end
end

def get_platforms(hypervisor_type = 'vmpooler', bhg_version = 0)
def get_platforms(_hypervisor_type = 'vmpooler', bhg_version = 0)
BeakerHostGenerator::Data.get_platforms(bhg_version)
end

Expand Down