Showing 5 of 5 total issues
Method remove_nil_keys
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def remove_nil_keys(hash)
hash.inject({}) do |new_hash, (k,v)|
unless v.nil? || (v.respond_to?(:empty?) && v.empty?)
if v.class == Hash
cleaned_hashed = remove_nil_keys(v)
- 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 initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(project_path, cache_dir_name, archive_base_path, terminal, tmpdir, swift_version_resolver = SwiftVersionResolver.new)
Method create_archive
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_archive(force = false, prune = nil, prune_white_list = nil, platforms = nil)
prune ||= config.prune_on_publish
platforms ||= config.platforms
prune_white_list ||= config.prune_white_list
- 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 delete_framework_files
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def delete_framework_files(framework_path)
framework_dsym_path = "#{framework_path}.dSYM"
terminal.vputs "Deleting #{framework_name(framework_path)} files because they are no longer needed ..."
# Deletes .framework 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 validate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def validate
return missing_bucket_name unless has_bucket_name?
return missing_aws_region unless has_aws_region?
return missing_aws_access_key_id if is_missing_aws_access_key_id?
- 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"