Showing 37 of 37 total issues
Wrap expressions with varying precedence with parentheses to avoid ambiguity. Open
host_os && host_os.type || host.type
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Avoid rescuing the Exception
class. Perhaps you meant to rescue StandardError
? Open
rescue Exception => e handle_credentials_verification_error(e)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Useless method definition detected. Open
def set_or_default_hardware_field_values(vm) super(vm) end
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Use ==
if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition. Open
return unless content = customization_template_content
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Avoid hard coding large quantities of data in code. Prefer reading the data from an external source. Open
EVENT_CODES = { # Code Description 0 => "UNASSIGNED", 1 => "VDC_START", 2 => "VDC_STOP",
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Use ==
if you meant to do a comparison or wrap the expression in parentheses to indicate you meant to assign in a condition. Open
return unless content = customization_template_content
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Use filter_map
instead. Open
disks_spec.collect do |disk_spec| disk = prepare_disk_for_add(disk_spec) _log.info("disk: #{disk.inspect}") disk end.compact
- Create a ticketCreate a ticket
- Exclude checks
Do not suppress exceptions. Open
rescue LoadError
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Empty class detected. Open
class ManageIQ::Providers::Ovirt::InfraManager::Scanningend
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Avoid rescuing the Exception
class. Perhaps you meant to rescue StandardError
? Open
rescue Exception => err _log.error("#{log_header} Unhandled exception during perf data collection: [#{err}], class: [#{err.class}]") _log.error("#{log_header} Timings at time of error: #{Benchmark.current_realtime.inspect}") _log.log_backtrace(err) raise
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Unused method argument - host
. If it's necessary, use _
or _host
as an argument name to indicate that it won't be used. If it's unnecessary, remove it. Open
def vm_hardware_guest_devices(persister_hardware, vm, addresses, host)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Avoid rescuing the Exception
class. Perhaps you meant to rescue StandardError
? Open
rescue Exception => err msg = "#{log_header}: Connection to [#{ems_display_text}] failed for VM:[#{@vm_cfg_file}] with error [#{err}] after [#{Time.now - st}] seconds" $log.error msg raise
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
metadata['rubygems_mfa_required']
must be set to 'true'
. Open
Gem::Specification.new do |spec| spec.name = "manageiq-providers-ovirt" spec.version = ManageIQ::Providers::Ovirt::VERSION spec.authors = ["ManageIQ Authors"]
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Use any?(ExtManagementSystem)
instead of block. Open
ems_in_list = targets.any? { |t| t.kind_of?(ExtManagementSystem) }
- Create a ticketCreate a ticket
- Exclude checks
Avoid rescuing the Exception
class. Perhaps you meant to rescue StandardError
? Open
rescue Exception => err _log.warn("#{log_prefix} Event Monitor Stop errored because [#{err.message}]") _log.warn("#{log_prefix} Error details: [#{err.details}]") _log.log_backtrace(err)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Use filter_map
instead. Open
vm.storages.collect(&:ems_ref).compact.each { |ems_ref| add_target!(:storagedomains, ems_ref) } unless vm.storages.nil?
- Create a ticketCreate a ticket
- Exclude checks