Showing 69 of 77 total issues
Avoid too many return
statements within this method. Open
return false if with_composite.is_output_identical(composite_interpreted_as_area)
Avoid too many return
statements within this method. Open
return true
Avoid too many return
statements within this method. Open
return nil
Method ensure_that_all_documented_are_really_rendered
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ensure_that_all_documented_are_really_rendered(list_of_documented, list_of_rendered)
list_of_documented.each do |documented|
if Info.get_expected_state(documented.key, documented.value) == :ignored
next
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 is_rendered_with_this_composite
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def is_rendered_with_this_composite(tags, type, provided_composite, zlevel, on_water)
tags_with_composite = deep_clone(tags)
composite = deep_clone(provided_composite)
composite.each do |key, value|
if tags_with_composite[key] != 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 get_tags_from_yaml_file
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_tags_from_yaml_file(yaml_filename)
possible_key_values = get_tags_from_osm2pqsql
tags = Set.new
yaml_file = open(yaml_filename)
yaml = yaml_file.read
- 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_expected_state
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.get_expected_state(key, value)
CartoCSSHelper::Configuration.get_style_specific_data.list_of_documented_tags.each do |documented|
next unless documented.key == key
return documented.state if documented.value == value
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 is_tag_documented
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def is_tag_documented(list, key, value)
list.each do |tag_info|
next unless key == tag_info.key
return true if value == tag_info.value
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 get_expected_composite
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.get_expected_composite(key, value)
CartoCSSHelper::Configuration.get_style_specific_data.list_of_documented_tags.each do |documented|
next unless documented.key == key
return documented.composite if documented.value == value
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"