Showing 12 of 12 total issues
Class Builder
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
class Builder
def initialize(platform, static_installer, source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps)
@platform = platform
@static_installer = static_installer
@source_dir = source_dir
File builder.rb
has 257 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Pod
class Builder
def initialize(platform, static_installer, source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps)
@platform = platform
@static_installer = static_installer
Method initialize
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(platform, static_installer, source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps)
Method initialize
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(argv)
@embedded = argv.flag?('embedded')
@library = argv.flag?('library')
@dynamic = argv.flag?('dynamic')
@local = argv.flag?('local', false)
Method copy_headers
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def copy_headers
headers_source_root = "#{@public_headers_root}/#{@spec.name}"
Dir.glob("#{headers_source_root}/**/*.h").
each { |h| `ditto #{h} #{@fwk.headers_path}/#{h.sub(headers_source_root, '')}` }
- 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_with_path
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def spec_with_path(path)
return if path.nil?
path = Pathname.new(path)
path = Pathname.new(Dir.pwd).join(path) unless path.absolute?
return unless path.exist?
- 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_platform
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def spec_platform(platform)
fwk_base = platform.name.to_s + '/' + framework_path
spec = <<RB
s.#{platform.name}.deployment_target = '#{platform.deployment_target}'
s.#{platform.name}.vendored_framework = '#{fwk_base}'
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def podfile_from_spec(path, spec_name, platform_name, deployment_target, subspecs, sources)
Method validate!
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def validate!
super
help! 'A podspec name or path is required.' unless @spec
help! 'podspec has binary-only depedencies, mangling not possible.' if @mangle && binary_only?(@spec)
help! '--bundle-identifier option can only be used for dynamic frameworks' if @bundle_identifier && !@dynamic
- 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 xcodebuild
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def xcodebuild(defines = '', args = '', build_dir = 'build', target = 'Pods-packager', project_root = @static_sandbox_root, config = @config)
Method initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def initialize(argv)
@embedded = argv.flag?('embedded')
@library = argv.flag?('library')
@dynamic = argv.flag?('dynamic')
@local = argv.flag?('local', false)
- 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 copy_resources
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def copy_resources
bundles = Dir.glob("#{@static_sandbox_root}/build/*.bundle")
if @dynamic
resources_path = "ios/#{@spec.name}.framework"
`cp -rp #{@static_sandbox_root}/build/*.bundle #{resources_path} 2>&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"