Method lookup_code_point
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def lookup_code_point(code_point)
{}.tap do |properties|
each_property_pair do |property_name, property_value|
code_points = code_points_for_property(
property_name, property_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 property_values_for
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def property_values_for(property_name)
if property_values.include?(property_name)
return property_values[property_name]
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 each_property_pair
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def each_property_pair
if block_given?
property_names.each do |property_name|
if property_values = property_values_for(property_name)
property_values.each do |property_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 code_points_for_property
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def code_points_for_property(property_name, property_value = nil)
key = key_for(property_name, property_value)
node = trie.get_node(key)
if node
- 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"