Showing 310 of 310 total issues
Method scope_by_specs
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def scope_by_specs
root_spec = variants.first.root_spec
specs = [root_spec]
specs += if root_spec.default_subspecs.empty?
root_spec.subspecs.compact
- 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
Class Sandbox
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
class Sandbox
autoload :FileAccessor, 'cocoapods/sandbox/file_accessor'
autoload :HeadersStore, 'cocoapods/sandbox/headers_store'
autoload :PathList, 'cocoapods/sandbox/path_list'
autoload :PodDirCleaner, 'cocoapods/sandbox/pod_dir_cleaner'
Method script
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
def script
script = <<-SH.strip_heredoc
#{Pod::Generator::ScriptPhaseConstants::DEFAULT_SCRIPT_PHASE_HEADER}
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
File resolver.rb
has 317 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'molinillo'
require 'cocoapods/podfile'
module Pod
class NoSpecFoundError < Informative
Method install!
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
def install!
UI.message "- Installing target `#{target.name}` #{target.platform}" do
create_support_files_dir
library_file_accessors = target.file_accessors.select { |fa| fa.spec.library_specification? }
test_file_accessors = target.file_accessors.select { |fa| fa.spec.test_specification? }
Method analyze_host_targets_in_podfile
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def analyze_host_targets_in_podfile(aggregate_targets, embedded_aggregate_targets)
target_definitions_by_uuid = {}
cli_host_with_dynamic_linkage = []
cli_product_type = 'com.apple.product-type.tool'
# Collect aggregate target definitions by uuid to later lookup host 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 key_difference
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def key_difference(other)
if other.type != type
:project
else
case 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 create_app_import_source_file
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def self.create_app_import_source_file(project, pod_target, platform, name = 'App')
language = pod_target.uses_swift? ? :swift : :objc
if language == :swift
source_file = project.path.dirname.+("#{name}/main.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 dependencies_for_specs
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def dependencies_for_specs(specs, platform, all_specs)
dependent_specs = {
:debug => Set.new,
:release => Set.new,
}
- 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 podfile_from_spec
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def podfile_from_spec(platform_name, deployment_target, use_frameworks = true, test_spec_names = [], use_modular_headers = false, use_static_frameworks = false)
name = subspec_name || spec.name
podspec = file.realpath
local = local?
urls = source_urls
- 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 relative_glob
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def relative_glob(patterns, options = {})
return [] if patterns.empty?
dir_pattern = options[:dir_pattern]
exclude_patterns = options[:exclude_patterns]
- 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_resources_bundle_targets
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def add_resources_bundle_targets(file_accessors)
file_accessors.each_with_object({}) do |file_accessor, hash|
hash[file_accessor.spec.name] = file_accessor.resource_bundles.map do |bundle_name, paths|
label = target.resources_bundle_target_label(bundle_name)
resource_bundle_target = project.new_resources_bundle(label, file_accessor.spec_consumer.platform_name, nil, bundle_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 script
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
def script
script = <<-SH.strip_heredoc
#{Pod::Generator::ScriptPhaseConstants::DEFAULT_SCRIPT_PHASE_HEADER}
#{Pod::Generator::ScriptPhaseConstants::RSYNC_PROTECT_TMP_FILES}
Class Resolver
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class Resolver
require 'cocoapods/resolver/lazy_specification'
require 'cocoapods/resolver/resolver_specification'
# @return [Sandbox] the Sandbox used by the resolver to find external
Method allowable_project_paths
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def allowable_project_paths(paths)
lproj_paths = Set.new
lproj_paths_with_files = Set.new
# Remove all file ref under .docc folder, but preserve the .docc folder
- 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 validate_xcframeworks
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def validate_xcframeworks
target.xcframeworks.each_value do |xcframeworks|
xcframeworks.each do |xcframework|
if xcframework.slices.empty?
raise Informative, "Unable to install vendored xcframework `#{xcframework.name}` for Pod `#{target.label}` because it does not contain any binaries."
- 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
Class Config
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class Config
# The default settings for the configuration.
#
# Users can specify custom settings in `~/.cocoapods/config.yaml`.
# An example of the contents of this file might look like:
Method pod
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def pod(set, mode = :normal)
if mode == :name_and_version
puts_indented "#{set.name} #{set.versions.first.version}"
else
pod = Specification::Set::Presenter.new(set)
- 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 configure_pod_targets
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def configure_pod_targets(target_installation_results)
target_installation_results.first.values.each do |pod_target_installation_result|
pod_target = pod_target_installation_result.target
native_target = pod_target_installation_result.native_target
native_target.build_configuration_list.build_configurations.each do |build_configuration|
- 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 perform_extensive_analysis
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def perform_extensive_analysis(spec)
if spec.non_library_specification?
error('spec', "Validating a non library spec (`#{spec.name}`) is not supported.")
return false
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"