Showing 74 of 74 total issues
Class Project
has 47 methods (exceeds 20 allowed). Consider refactoring. Open
class Project
include Object
# @return [Pathname] the path of the project.
#
File constants.rb
has 431 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Xcodeproj
# This modules groups all the constants known to Xcodeproj.
#
module Constants
# @return [String] The last known iOS SDK (stable).
File native_target.rb
has 365 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Xcodeproj
class Project
module Object
class AbstractTarget < AbstractObject
# @!group Attributes
Method array_diff
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def self.array_diff(value_1, value_2, options)
ensure_class(value_1, Array)
ensure_class(value_2, Array)
return nil if value_1 == value_2
- 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 project.rb
has 330 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'atomos'
require 'fileutils'
require 'securerandom'
require 'xcodeproj/project/object'
Class PBXGroup
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
class PBXGroup < AbstractObject
# @!group Attributes
# @return [ObjectList<PBXGroup, PBXFileReference>]
# the objects contained by the group.
Method normalize_array_settings
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def normalize_array_settings(settings)
return unless settings
array_settings = BuildSettingsArraySettingsByObjectVersion[project.object_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
File object.rb
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
module Xcodeproj
class Project
# This is the namespace in which all the classes that wrap the objects in
# a Xcode project reside.
#
Method sort
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def sort(options = nil)
children.sort! do |x, y|
if options && groups_position = options[:groups_position]
raise ArgumentError unless [:above, :below].include?(groups_position)
if x.isa == 'PBXGroup' && !(y.isa == 'PBXGroup')
- 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 AbstractObject
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class AbstractObject
# @!group AbstractObject
# @return [String] the ISA of the class.
#
Class XCScheme
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class XCScheme
# @return [REXML::Document] the XML object that will be manipulated to save
# the scheme file after.
#
attr_reader :doc
Class AbstractTarget
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class AbstractTarget < AbstractObject
# @!group Attributes
# @return [String] The name of the Target.
#
Method resolved_build_setting
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def resolved_build_setting(key, resolve_against_xcconfig = false)
target_settings = build_configuration_list.get_setting(key, resolve_against_xcconfig, self)
project_settings = project.build_configuration_list.get_setting(key, resolve_against_xcconfig)
target_settings.merge(project_settings) do |_key, target_val, proj_val|
target_includes_inherited = Constants::INHERITED_KEYWORDS.any? { |keyword| target_val.include?(keyword) } if target_val
- 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_with_plist
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def configure_with_plist(objects_by_uuid_plist)
object_plist = objects_by_uuid_plist[uuid].dup
unless object_plist['isa'] == isa
raise "[Xcodeproj] Attempt to initialize `#{isa}` from plist with " \
- 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_with_plist
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
def configure_with_plist(objects_by_uuid_plist)
object_plist = objects_by_uuid_plist[uuid].dup
unless object_plist['isa'] == isa
raise "[Xcodeproj] Attempt to initialize `#{isa}` from plist with " \
Method to_hash
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def to_hash(prefix = nil)
list = []
list += other_linker_flags[:simple].to_a.sort
modifiers = {
:frameworks => '-framework ',
- 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 array_diff
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.array_diff(value_1, value_2, options)
ensure_class(value_1, Array)
ensure_class(value_2, Array)
return nil if value_1 == value_2
Method add_file_references
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def add_file_references(file_references, compiler_flags = {})
file_references.map do |file|
extension = File.extname(file.path).downcase
header_extensions = Constants::HEADER_FILES_EXTENSIONS
is_header_phase = header_extensions.include?(extension)
- 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 resolve_variable_substitution
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def resolve_variable_substitution(key, value, root_target, previous_key = nil)
case value
when Array
return value.map { |v| resolve_variable_substitution(key, v, root_target) }
when nil
- 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 to_hash
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def to_hash(prefix = nil)
list = []
list += other_linker_flags[:simple].to_a.sort
modifiers = {
:frameworks => '-framework ',