Showing 281 of 310 total issues
Method translate_output_to_linter_messages
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def translate_output_to_linter_messages(parsed_output)
parsed_output.each do |message|
# Checking the error for `InputFile` is to work around an Xcode
# issue where linting would fail even though `xcodebuild` actually
# succeeds. Xcode.app also doesn't fail when this issue occurs, so
- 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 analyze
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def analyze(allow_fetches = true)
return @result if @result
validate_podfile!
validate_lockfile_version!
if installation_options.integrate_targets?
- 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_or_update_user_script_phases
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_or_update_user_script_phases(script_phases, native_target)
script_phase_names = script_phases.map { |k| k[:name] }
# Delete script phases no longer present in the target.
native_target_script_phases = native_target.shell_script_build_phases.select do |bp|
!bp.name.nil? && bp.name.start_with?(USER_BUILD_PHASE_PREFIX)
- 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 podspec_files
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def podspec_files
if @podspec
path = Pathname(@podspec)
raise Informative, "Couldn't find #{@podspec}" unless path.exist?
[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 dependency_for_cached_target?
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.dependency_for_cached_target?(sandbox, target, cached_target)
target.dependencies.find do |dep|
if dep.target_proxy.remote?
subproject_reference = target.project.reference_for_path(sandbox.root + cached_target.container_project_path)
uuid = subproject_reference.uuid if subproject_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 requires_64_bit_archs?
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def requires_64_bit_archs?(platform, object_version)
return false unless platform
case platform.name
when :osx
true
- 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_vendored_dynamic_frameworks
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def validate_vendored_dynamic_frameworks
deployment_target = spec.subspec_by_name(subspec_name).deployment_target(consumer.platform_name)
unless file_accessor.nil?
dynamic_frameworks = file_accessor.vendored_dynamic_frameworks
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
def run
if @pod_name.nil?
# Note: at that point, @wipe_all is always true (thanks to `validate!`)
# Remove all
clear_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 merge_to_docc_folder
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def merge_to_docc_folder(paths)
docc_paths_with_files = Set.new
allowable_paths = paths.select do |path|
path_str = path.to_s
- 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 prepare_pod_groups
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def prepare_pod_groups
file_accessors.each do |file_accessor|
pod_name = file_accessor.spec.name
next unless sandbox.local?(pod_name)
root_name = Specification.root_name(pod_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 workspace_path
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def workspace_path
if podfile.workspace_path
declared_path = podfile.workspace_path
path_with_ext = File.extname(declared_path) == '.xcworkspace' ? declared_path : "#{declared_path}.xcworkspace"
podfile_dir = File.dirname(podfile.defined_in_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 analyze
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def analyze
target_by_label = Hash[(pod_targets + aggregate_targets).map { |target| [target.label, target] }]
cache_key_by_target_label = create_cache_key_mappings(target_by_label)
full_install_results = ProjectCacheAnalysisResult.new(pod_targets, aggregate_targets, cache_key_by_target_label,
- 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!
download_source unless predownloaded? || local?
PodSourcePreparer.new(root_spec, root).prepare! if local?
sandbox.remove_local_podspec(name) unless predownloaded? || local? || external?
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 verify_compatibility!
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def verify_compatibility!
super
latest_cocoapods_version = metadata.latest_cocoapods_version && Gem::Version.create(metadata.latest_cocoapods_version)
return unless Config.instance.new_version_message? &&
latest_cocoapods_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 install_pod_sources
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def install_pod_sources
@downloaded_specs = []
@installed_specs = []
pods_to_install = sandbox_state.added | sandbox_state.changed
title_options = { :verbose_prefix => '-> '.green }
- 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!
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def validate!
raise ArgumentError, 'Requires a name' unless name
raise ArgumentError, 'Must give a spec for a released download request' if released_pod? && !spec
raise ArgumentError, 'Requires a version if released' if released_pod? && !spec.version
raise ArgumentError, 'Requires params' unless params
- 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 report_error
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.report_error(exception)
case exception
when Interrupt
puts '[!] Cancelled'.red
Config.instance.verbose? ? raise : exit(1)
- 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 compiler_flags_for_consumer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def compiler_flags_for_consumer(consumer, arc, language)
flags = consumer.compiler_flags.dup
if !arc && language == :objc
flags << '-fno-objc-arc'
else
- 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_source_with_url
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_source_with_url(url)
name = name_for_url(url)
is_cdn = cdn_url?(url)
# Hack to ensure that `repo add` output is shown.
- 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_for_installed_script_phases
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def warn_for_installed_script_phases
pods_to_install = sandbox_state.added | sandbox_state.changed
pod_targets.group_by(&:pod_name).each do |name, pod_targets|
if pods_to_install.include?(name) && !sandbox.local?(name)
script_phase_count = pod_targets.inject(0) { |sum, target| sum + target.script_phases.count }
- 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"