Showing 11 of 175 total issues
Method process_vmware_pxe
has a Cognitive Complexity of 18 (exceeds 11 allowed). Consider refactoring. Open
def process_vmware_pxe
if product.include?("windows") && @mapping == 1
# find the windows image that matches the template name if a PXE Image was NOT chosen in the dialog
if prov.get_option(:pxe_image_id).nil?
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method process_ovirt_pxe
has a Cognitive Complexity of 17 (exceeds 11 allowed). Consider refactoring. Open
def process_ovirt_pxe
if product.include?("windows")
# find the windows image that matches the template name if a PXE Image was NOT chosen in the dialog
if prov.get_option(:pxe_image_id).nil?
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method process_redhat_pxe
has a Cognitive Complexity of 17 (exceeds 11 allowed). Consider refactoring. Open
def process_redhat_pxe
if product.include?("windows")
# find the windows image that matches the template name if a PXE Image was NOT chosen in the dialog
if prov.get_option(:pxe_image_id).nil?
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method process_ovirt_iso
has a Cognitive Complexity of 16 (exceeds 11 allowed). Consider refactoring. Open
def process_ovirt_iso
if product.include?("windows")
# Linux Support only for now
else
# Linux - Find the first ISO Image that matches the template name if NOT chosen in the dialog
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method process_redhat_iso
has a Cognitive Complexity of 16 (exceeds 11 allowed). Consider refactoring. Open
def process_redhat_iso
if product.include?("windows")
# Linux Support only for now
else
# Linux - Find the first ISO Image that matches the template name if NOT chosen in the dialog
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method process_vmware
has a Cognitive Complexity of 15 (exceeds 11 allowed). Consider refactoring. Open
def process_vmware
# if prov.get_option(:sysprep_custom_spec) || product.include?("other") || prov.provision_type.include?("clone_to_template")
if product.include?("other") || prov.provision_type.include?("clone_to_template")
@mapping = 0
end
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method process_redhat
has a Cognitive Complexity of 14 (exceeds 11 allowed). Consider refactoring. Open
def process_redhat
log(:info, "Processing process_redhat...", true)
if prov.get_option(:customization_template_id).nil?
customization_template_search_by_ws_values = ws_values[:customization_template]
customization_template_search_by_template_name = template.name
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method set_options
has a Cognitive Complexity of 14 (exceeds 11 allowed). Consider refactoring. Open
def set_options
if prov.get_option(:instance_type).nil? && ws_values.key?(:instance_type)
provider.flavors.each do |flavor|
if flavor.name.downcase == ws_values[:instance_type].downcase
prov.set_option(:instance_type, [flavor.id, "#{flavor.name}':'#{flavor.description}"])
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method set_options
has a Cognitive Complexity of 14 (exceeds 11 allowed). Consider refactoring. Open
def set_options
if prov.get_option(:instance_type).nil? && ws_values.key?(:instance_type)
provider.flavors.each do |flavor|
if flavor.name.downcase == ws_values[:instance_type].downcase
prov.set_option(:instance_type, [flavor.id, "#{flavor.name}':'#{flavor.description}"])
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method process_ovirt
has a Cognitive Complexity of 14 (exceeds 11 allowed). Consider refactoring. Open
def process_ovirt
log(:info, "Processing process_ovirt...", true)
if prov.get_option(:customization_template_id).nil?
customization_template_search_by_ws_values = ws_values[:customization_template]
customization_template_search_by_template_name = template.name
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method best_fit_least_utilized
has a Cognitive Complexity of 13 (exceeds 11 allowed). Consider refactoring. Open
def best_fit_least_utilized
host = storage = min_registered_vms = nil
request.eligible_hosts.select { |h| !h.maintenance && h.power_state == "on" }.each do |h|
next if min_registered_vms && h.vms.size >= min_registered_vms
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"