Method verify_swift_pods_have_module_dependencies
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def verify_swift_pods_have_module_dependencies
error_messages = []
pod_targets.each do |pod_target|
next unless pod_target.uses_swift? && pod_target.should_build?
- 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 verify_swift_pods_swift_version
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def verify_swift_pods_swift_version
error_message_for_target_definition = lambda do |target_definition|
"`#{target_definition.name}` (Swift #{target_definition.swift_version})"
end
swift_pod_targets = pod_targets.select(&:uses_swift?)
- 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 verify_no_static_framework_transitive_dependencies
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def verify_no_static_framework_transitive_dependencies
aggregate_targets.each do |aggregate_target|
aggregate_target.user_build_configurations.each_key do |config|
pod_targets = aggregate_target.pod_targets_for_build_configuration(config)
built_targets, unbuilt_targets = pod_targets.partition(&:should_build?)
- 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"