Showing 310 of 310 total issues
File build_settings.rb
has 782 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Pod
class Target
# @since 1.5.0
class BuildSettings
#-------------------------------------------------------------------------#
File pod_target_installer.rb
has 779 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'active_support/core_ext/array'
require 'active_support/core_ext/string/inflections'
require 'cocoapods/xcode'
module Pod
Class PodTarget
has 90 methods (exceeds 20 allowed). Consider refactoring. Open
class PodTarget < Target
# @return [Array<Specification>] the spec, subspecs and test specs of the target.
#
attr_reader :specs
File validator.rb
has 729 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'active_support/core_ext/array'
require 'active_support/core_ext/string/inflections'
module Pod
# Validates a Specification.
File analyzer.rb
has 717 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'cocoapods/podfile'
module Pod
class Installer
# Analyzes the Podfile, the Lockfile, and the sandbox manifest to generate
File installer.rb
has 630 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'active_support/core_ext/string/inflections'
require 'fileutils'
require 'cocoapods/podfile'
module Pod
File pod_target.rb
has 614 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'cocoapods/xcode/framework_paths'
require 'cocoapods/xcode/xcframework'
module Pod
# Stores the information relative to the target used to compile a single Pod.
Class Validator
has 65 methods (exceeds 20 allowed). Consider refactoring. Open
class Validator
include Config::Mixin
# The default version of Swift to use when linting pods
#
Class Installer
has 64 methods (exceeds 20 allowed). Consider refactoring. Open
class Installer
autoload :Analyzer, 'cocoapods/installer/analyzer'
autoload :InstallationOptions, 'cocoapods/installer/installation_options'
autoload :PostInstallHooksContext, 'cocoapods/installer/post_install_hooks_context'
autoload :PreInstallHooksContext, 'cocoapods/installer/pre_install_hooks_context'
Method install!
has a Cognitive Complexity of 50 (exceeds 5 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? }
- 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 FileAccessor
has 49 methods (exceeds 20 allowed). Consider refactoring. Open
class FileAccessor
HEADER_EXTENSIONS = Xcodeproj::Constants::HEADER_FILES_EXTENSIONS
SOURCE_FILE_EXTENSIONS = (%w(.m .mm .i .c .cc .cxx .cpp .c++ .swift) + HEADER_EXTENSIONS).uniq.freeze
GLOB_PATTERNS = {
Class AggregateTarget
has 48 methods (exceeds 20 allowed). Consider refactoring. Open
class AggregateTarget < Target
# Product types where the product's frameworks must be embedded in a host target
#
EMBED_FRAMEWORKS_IN_HOST_TARGET_TYPES = [:app_extension, :framework, :static_library, :messages_extension,
:watch_extension, :xpc_service].freeze
Method build_pod
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
def build_pod
if !xcodebuild_available?
UI.warn "Skipping compilation with `xcodebuild` because it can't be found.\n".yellow
else
UI.message "\nBuilding with `xcodebuild`.\n".yellow 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
File target_integrator.rb
has 440 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'active_support/core_ext/string/inflections'
require 'cocoapods/xcode/framework_paths'
require 'cocoapods/target/build_settings'
module Pod
Class PodTargetInstaller
has 45 methods (exceeds 20 allowed). Consider refactoring. Open
class PodTargetInstaller < TargetInstaller
require 'cocoapods/installer/xcode/pods_project_generator/app_host_installer'
# @return [Array<Pathname>] Array of umbrella header paths in the headers directory
#
Class Analyzer
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
class Analyzer
include Config::Mixin
autoload :AnalysisResult, 'cocoapods/installer/analyzer/analysis_result'
autoload :LockingDependencyAnalyzer, 'cocoapods/installer/analyzer/locking_dependency_analyzer'
Class Target
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class Target
DEFAULT_VERSION = '1.0.0'.freeze
DEFAULT_NAME = 'Default'.freeze
DEFAULT_BUILD_CONFIGURATIONS = { 'Release' => :release, 'Debug' => :debug }.freeze
Method define_build_settings_method
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def self.define_build_settings_method(method_name, build_setting: false,
memoized: false, sorted: false, uniqued: false, compacted: false, frozen: true,
from_search_paths_aggregate_targets: false, from_pod_targets_to_link: false,
&implementation)
- 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 TargetIntegrator
has 34 methods (exceeds 20 allowed). Consider refactoring. Open
class TargetIntegrator
autoload :XCConfigIntegrator, 'cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator'
# @return [String] the string to use as prefix for every build phase added to the user project
#
Method handle_resolver_error
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def handle_resolver_error(error)
message = error.message
type = Informative
unless specs_updated?
specs_update_message = "\n * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`."
- 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"