Showing 281 of 310 total issues
Method analyze
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def analyze(allow_fetches = true)
return @result if @result
validate_podfile!
validate_lockfile_version!
if installation_options.integrate_targets?
Method add_header
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def add_header(file_accessor, build_file, public_headers, project_headers, private_headers, native_target)
file_ref = build_file.file_ref
acl = if !target.build_as_framework? # Headers are already rooted at ${PODS_ROOT}/Headers/P*/[pod]/...
'Project'
elsif public_headers.include?(file_ref.real_path)
Method add_copy_resources_script_phase
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def add_copy_resources_script_phase(native_target, spec)
script_path = "${PODS_ROOT}/#{target.copy_resources_script_path_for_spec(spec).relative_path_from(target.sandbox.root)}"
input_paths_by_config = {}
output_paths_by_config = {}
Method wire_test_native_target_app_host
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def wire_test_native_target_app_host(test_native_target, pod_target, pod_target_installation_results, project, metadata_cache, app_host_pod_target_label, app_host_target_label)
if dependency_installation_result = pod_target_installation_results[app_host_pod_target_label]
unless app_native_target = dependency_installation_result.app_host_target_labelled(app_host_target_label)
raise Informative, "Did not find target with label #{app_host_target_label} in the set of targets installed for #{app_host_pod_target_label}."
end
Method add_specs_to_repo
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def add_specs_to_repo
UI.puts "\nAdding the #{'spec'.pluralize(count)} to the `#{@repo}' repo\n".yellow
podspec_files.each do |spec_file|
spec = Pod::Specification.from_file(spec_file)
output_path = @source.pod_path(spec.name) + spec.version.to_s
Method validate_dynamic_framework_support
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def validate_dynamic_framework_support(aggregate_targets, deployment_target)
return unless consumer.platform_name == :ios
return unless deployment_target.nil? || Version.new(deployment_target).major < 8
aggregate_targets.each do |target|
if target.pod_targets.any?(&: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 developer_files
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def developer_files
podspecs = specs
result = [module_map, prefix_header]
if license_path = spec_consumer.license[:file]
- 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 compute_project_path
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def compute_project_path
if target_definition.user_project_path
path = installation_root + target_definition.user_project_path
path = "#{path}.xcodeproj" unless File.extname(path) == '.xcodeproj'
path = Pathname.new(path)
- 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 reader
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def self.reader(input, output)
Thread.new do
buf = ''
begin
loop 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 spec_is_platform_compatible?
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def spec_is_platform_compatible?(dependency_graph, dependency, spec)
# This is safe since a pod will only be in locked dependencies if we're
# using the same exact version
return true if locked_dependencies.vertex_named(spec.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 license_text
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def license_text(spec)
return nil unless spec.license
text = spec.license[:text]
unless text
if license_file = spec.license[:file]
- 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 store_podspec
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def store_podspec(name, podspec, _external_source = false, json = false)
file_name = json ? "#{name}.podspec.json" : "#{name}.podspec"
output_path = specifications_root + file_name
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 set_target_xcconfig
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def self.set_target_xcconfig(pod_bundle, target, config)
file_ref = create_xcconfig_ref(pod_bundle, config)
path = file_ref.path
existing = config.base_configuration_reference
- 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 generate_targets
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def generate_targets(resolver_specs_by_target, target_inspections)
resolver_specs_by_target = resolver_specs_by_target.reject { |td, _| td.abstract? && !td.platform }
pod_targets = generate_pod_targets(resolver_specs_by_target, target_inspections)
pod_targets_by_target_definition = group_pod_targets_by_target_definition(pod_targets, resolver_specs_by_target)
aggregate_targets = resolver_specs_by_target.keys.reject(&:abstract?).map do |target_definition|
- 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_inherited_to_plural
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def add_inherited_to_plural(hash)
Hash[hash.map do |key, value|
next [key, '$(inherited)'] if value.nil?
if PLURAL_SETTINGS.include?(key)
raise ArgumentError, "#{key} is a plural setting, cannot have #{value.inspect} as its value" unless value.is_a? Array
- 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 warn_about_xcconfig_overrides
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def warn_about_xcconfig_overrides
targets_to_integrate.each do |aggregate_target|
aggregate_target.user_targets.each do |user_target|
user_target.build_configurations.each do |config|
xcconfig = aggregate_target.xcconfigs[config.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 add_file_accessors_paths_to_pods_group
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def add_file_accessors_paths_to_pods_group(file_accessor_key, group_key = nil, reflect_file_system_structure = false)
file_accessors.flat_map do |file_accessor|
paths = file_accessor.send(file_accessor_key)
paths = allowable_project_paths(paths)
next [] if paths.empty?
- 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 from_pod_target
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def self.from_pod_target(sandbox, target_by_label, pod_target, is_local_pod: false, checkout_options: nil)
build_settings = {}
build_settings[pod_target.label.to_s] = Hash[pod_target.build_settings.map do |k, v|
[k, Digest::MD5.hexdigest(v.xcconfig.to_s)]
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"
Further reading
Method wire_test_native_targets
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def wire_test_native_targets(pod_target, installation_result, pod_target_installation_results, project, metadata_cache)
installation_result.test_specs_by_native_target.each do |test_native_target, test_spec|
resource_bundle_native_targets = installation_result.test_resource_bundle_targets[test_spec.name] || []
resource_bundle_native_targets.each do |test_resource_bundle_target|
test_native_target.add_dependency(test_resource_bundle_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 download
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def self.download(
request,
target,
can_cache: true,
cache_path: Config.instance.cache_root + 'Pods'
- 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"