Showing 281 of 310 total issues
Method download_request
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.download_request(request, target)
result = Response.new
result.checkout_options = download_source(target, request.params)
result.location = target
- 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 install_pod_targets
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def install_pod_targets(project, pod_targets)
umbrella_headers_by_dir = pod_targets.map do |pod_target|
next unless pod_target.should_build? && pod_target.defines_module?
pod_target.umbrella_header_path
end.compact.group_by(&:dirname)
- 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_module_map
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_module_map(native_target)
return super(native_target) unless custom_module_map
path = target.module_map_path_to_write
UI.message "- Copying module map file to #{UI.path(path)}" do
- 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 add_system_framework_dependencies
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def add_system_framework_dependencies(pod_target_installation_results)
sorted_installation_results = pod_target_installation_results.sort_by do |pod_target_installation_result|
pod_target_installation_result.target.name
end
sorted_installation_results.each do |target_installation_result|
- 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 header_mappings
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def header_mappings(file_accessor, headers)
consumer = file_accessor.spec_consumer
header_mappings_dir = consumer.header_mappings_dir
dir = headers_sandbox
dir += consumer.header_dir if consumer.header_dir
- 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 install!
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def install!
UI.message "- Installing target `#{target.name}` #{target.platform}" do
native_target = add_target
create_support_files_dir
create_support_files_group
- 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
Avoid too many return
statements within this method. Open
return true if sandbox.predownloaded?(pod)
Avoid too many return
statements within this method. Open
return true if folder_empty?(pod)
Avoid too many return
statements within this method. Open
return :project if this_resources != other_resources
Avoid too many return
statements within this method. Open
return :project if this_build_settings != other_build_settings
Avoid too many return
statements within this method. Open
return :project if this_checkout_options != other_checkout_options
Avoid too many return
statements within this method. Open
return :project if this_files != other_files
Method initialize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def initialize(use_user_settings = true)
configure_with(DEFAULTS)
unless ENV['CP_HOME_DIR'].nil?
@cache_root = home_dir + 'cache'
- 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 cocoapods_sha
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.cocoapods_sha
return unless gemspec = Gem.loaded_specs['cocoapods']
return unless source = gemspec.source
return unless source.respond_to?(:revision)
source.revision
- 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 add_build_configuration
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def add_build_configuration(name, type)
build_configuration = super
settings = build_configuration.build_settings
definitions = settings['GCC_PREPROCESSOR_DEFINITIONS'] || ['$(inherited)']
defines = [defininition_for_build_configuration(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 requirement_satisfied_by?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def requirement_satisfied_by?(requirement, activated, spec)
version = spec.version
return false unless requirement.requirement.satisfied_by?(version)
return false unless valid_possibility_version_for_root_name?(requirement, activated, spec)
return false unless spec_is_platform_compatible?(activated, requirement, spec)
- 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 run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def run
UI.puts("$CACHE_ROOT: #{@cache.root}") if @short_output
if @pod_name.nil? # Print all
@cache.cache_descriptors_per_pod.each do |pod_name, cache_descriptors|
print_pod_cache_infos(pod_name, cache_descriptors)
- 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 execute_command
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.execute_command(executable, command, raise_on_failure = true)
bin = which!(executable)
command = command.map(&:to_s)
if File.basename(bin) == 'tar.exe'
- 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 get_path_of_spec
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_path_of_spec(spec, version_filter = false)
sets = config.sources_manager.search_by_name(spec)
if sets.count == 1
set = sets.first
- 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 add_copy_resources_script_phase
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def add_copy_resources_script_phase
unless target.includes_resources?
native_targets.each do |native_target|
TargetIntegrator.remove_copy_resources_script_phase_from_target(native_target)
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"