Method normalize_array_settings
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def normalize_array_settings(settings)
return unless settings
array_settings = BuildSettingsArraySettingsByObjectVersion[project.object_version]
- 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 resolve_variable_substitution
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def resolve_variable_substitution(key, value, root_target, previous_key = nil)
case value
when Array
return value.map { |v| resolve_variable_substitution(key, v, root_target) }
when 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 resolve_variable_substitution
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def resolve_variable_substitution(key, value, root_target, previous_key = nil)
case value
when Array
return value.map { |v| resolve_variable_substitution(key, v, root_target) }
when nil
Method expand_build_setting
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def expand_build_setting(build_setting_value, config_value)
if build_setting_value.is_a?(Array) && config_value.is_a?(String)
config_value = split_build_setting_array_to_string(config_value)
elsif build_setting_value.is_a?(String) && config_value.is_a?(Array)
build_setting_value = split_build_setting_array_to_string(build_setting_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"