Showing 5 of 61 total issues
Method prepare_for_clone
has a Cognitive Complexity of 21 (exceeds 11 allowed). Consider refactoring. Open
def prepare_for_clone
specs = {
'image_id' => get_option_last(:src_vm_id),
'pin_policy' => get_option_last(:pin_policy),
}
- 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 create_new_volumes_array
has a Cognitive Complexity of 16 (exceeds 11 allowed). Consider refactoring. Open
def create_new_volumes_array(values)
new_volumes = []
# Regex to place the field name in the field index and count in the count index.
keys_regex = /(?<field>#{volume_dialog_keys.join('|')})_(?<count>\d+)/
- 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 post_execute_poll
has a Cognitive Complexity of 13 (exceeds 11 allowed). Consider refactoring. Open
def post_execute_poll(*_args)
ems = ExtManagementSystem.find(options[:ems_id])
max_retries = 10
message = 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 raw_create_volume
has a Cognitive Complexity of 12 (exceeds 11 allowed). Consider refactoring. Open
def self.raw_create_volume(ext_management_system, options)
volume = nil
volume_params = nil
affinity_volume = nil
anti_affinity_volumes = 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 poll
has a Cognitive Complexity of 12 (exceeds 11 allowed). Consider refactoring. Open
def poll
from_time = Time.now.utc.to_i
loop do
pcloud_events_api = ems.connect(:service => "PCloudEventsApi")
- 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"