Method assign_const
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def assign_const(value, prefix = '')
return if value.nil? or @defined_const.key?(value)
name = value.scan(/[^:\/]+\/?\z/)[0] || 'C'
tag = prefix + safeconstname(name)
if @defined_const.value?(tag)
- 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 dump_inout_type
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def dump_inout_type(param, element_definitions)
if param
message = param.find_message
params = ""
message.parts.each do |part|
- 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_type_name
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def create_type_name(modulepath, element)
if element.type == XSD::AnyTypeName
# nil means anyType.
nil
elsif simpletype = @simpletypes[element.type]
- 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 dump_inout_type
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def dump_inout_type(param, element_definitions)
if param
message = param.find_message
params = ""
message.parts.each do |part|