Showing 248 of 460 total issues
Method linode_disk_createfromimage
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def linode_disk_createfromimage(linode_id, image_id, label, size, password, sshkey)
Method request
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def request(params)
params[:query] ||= {}
params[:query].merge!(:api_key => @linode_api_key)
response = @connection.request(params)
- 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_record
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_record(domain_id, name, content, type, options = {})
Method create_instance
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_instance(name, image_id, instance_type, location, options)
Method create_volume
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_volume(name, offering_id, format, location_id, size)
Method create_instance
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_instance(name, image_id, instance_type, location, options={})
Method post_upload_media
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def post_upload_media(vdc_id, name, image_type, size, options={})
Method create_volume
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_volume(name, format, location_id, size, offering_id)
Method grid_server_add
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def grid_server_add(image, ip, name, server_ram, options={})
Method create_volume
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_volume(name, offering_id, format, location_id, size)
Method update_record
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def update_record(record_id, name, content, type, options = {})
Method create_instance
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_instance(name, image_id, instance_type, location, options={})
Method post_upload_media
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def post_upload_media(vdc_id, name, image_type, size, options={})
Method add_nic
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_nic(vlan=nil, ip_v4_conf=nil, ip_v6_conf=nil, model='virtio', boot_order=nil)
Method create_record
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_record(domain, name, type, data, options = {})
Method linode_disk_createfromdistribution
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def linode_disk_createfromdistribution(linode_id, distro_id, name, size, password)
Method mock_update
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def mock_update(data, obj_or_collection, status, key, &clean_before_update)
Method linode_disk_createfromdistribution
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def linode_disk_createfromdistribution(linode_id, distro_id, name, size, password)
Method extract_attributes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def extract_attributes(attributes_xml)
attributes = {}
until attributes_xml.empty?
if attributes_xml.first.is_a?(Array)
until attributes_xml.first.empty?
- 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 non_running?
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def non_running?
if @service.show_progress? && (@last_progress ||= 0) < 100
if status == 'running' || status == 'queued'
Fog::Formatador.redisplay_progressbar(progress, 100, :label => operation_name, :started_at => start_time)
@last_progress = progress
- 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"