Showing 5 of 119 total issues
Method split_on_unquoted
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def split_on_unquoted(seperator)
# 0 = start of string
split_positions, ignored_split_positions = [0], []
in_quote = false
- 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 metadata
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
def metadata(response)
response_class = response.class.name
uri, status, (link, content_location) = case response_class
when 'Curl::Easy'
Method metadata
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def metadata(response)
response_class = response.class.name
uri, status, (link, content_location) = case response_class
when 'Curl::Easy'
- 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 extract_target_attributes
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def extract_target_attributes(link_parameters)
target_attributes = []
link_parameters.each do |param_name, param_value|
next if %(rel anchor).include?(param_name)
next if %(media title title* type).include?(param_name) && first_match(target_attributes, param_name)
- 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 format
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def format(raw_params)
raw_params.map do |raw_param_name, raw_param_value|
next if !raw_param_name
param_name = rstrip_ows(raw_param_name.downcase)
- 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"