Showing 69 of 77 total issues
Method find_command
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.find_command(lat, lon, zlevel, bbox_size, image_size, export_filename)
Method get_query_to_get_location_set_format
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.get_query_to_get_location_set_format(tags, type, latitude, longitude, range, format)
Method get_image_filename
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_image_filename(debug = false) # TODO: misleading name - should be location
lat = 0
lon = 20
lon = 0 if @on_water
if @generated_image_location != 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 collect_images_for_real_data_test
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.collect_images_for_real_data_test(latitude, longitude, zlevels, source, image_size = 400)
Method get_elements_near_given_location
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.get_elements_near_given_location(tags, type, latitude, longitude, range_in_meters, invalidate_cache: false)
Method is_key_rendered_and_value_ignored_set
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def is_key_rendered_and_value_ignored_set(key, value, type, zlevel, on_water)
Method locate_element_with_given_tags_and_type
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.locate_element_with_given_tags_and_type(tags, type, latitude, longitude, max_range_in_km_for_radius = 1600)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(before, after, header, filename, image_size)
Method get_query_element_to_get_location
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.get_query_element_to_get_location(tags, latitude, longitude, type, range)
Method is_object_displaying_name_as_this_object_type
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def is_object_displaying_name_as_this_object_type(tags, name, zlevel, on_water, type)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(min_z, max_z, list_of_documented_tags, list_of_documented_compositions, name_label_is_not_required)
Method get_query_to_get_location
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.get_query_to_get_location(tags, type, latitude, longitude, range)
Method is_rendered_with_this_composite
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def is_rendered_with_this_composite(tags, type, provided_composite, zlevel, on_water)
Method get_query_to_find_data_pair
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.get_query_to_find_data_pair(bb, tags_a, tags_b, type_a, type_b, distance_in_meters: 20)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(tags, type, lat, lon, size)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(tags, zlevel, on_water, type, show_what_is_generated = false)
Method how_rendered_on_zlevel_as_composite
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def how_rendered_on_zlevel_as_composite(tags, type, zlevel, on_water, suggested_composite)
Method test_tag_on_real_data_for_this_type
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.test_tag_on_real_data_for_this_type(tags, new_branch, old_branch, zlevels, type, min = 4, skip = 0)
type = type[0] if type.is_a?(Array)
generated = 0
n = 0
- 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 print_render_state_of_tag
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def print_render_state_of_tag(key, value)
if is_rendered key, value
@last_composite = nil
if value == get_generic_tag_value
puts "#{key}=#{value} - primary generic tag value"
- 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 get_specified_resource
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_specified_resource(url, description: nil)
Log.info description if description
return @wrapper.fetch_data_from_url(url, @request_timeout)
rescue ExceptionWithResponse => e
output_shared_error_part(url, e)
- 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"