Showing 7 of 7 total issues
Method _lint
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def _lint acc = {}
acc &&= detect_projects acc
acc &&= detect_workspaces acc
acc &&= determine_name acc
acc &&= check_podfile acc
- 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 check_provisioning_profiles
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def check_provisioning_profiles acc
result = acc
acc[:build_configs].each do |name, config|
file = acc[:provisioning_profiles][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 detect_repository
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def detect_repository acc
begin
path = Rugged::Repository.discover
rescue
say_error "Must be in a git repository" and return 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 check_podfile
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def check_podfile acc
result = acc
file = Dir['Podfile'].first
say_error "No CocoaPods Podfile found" and return nil unless file
podfile = Pod::Podfile.from_file 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 initialize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def initialize profile = nil
if profile
@valid = true
@devices = []
if profile['ProvisionsAllDevices']
- 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 determine_workspace
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.determine_workspace
workspaces = Dir["*.xcworkspace"].grep(/^(.*)\.xcworkspace$/){$1}
say_error "No Xcode workspace found" and abort if workspaces.empty?
say_error "There can be only one workspace" and abort if workspaces.length > 1
workspaces.first
- 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 check_workspace
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def check_workspace acc
workspaces = Dir["*.xcworkspace"].map {|f| File.basename(f)}.grep(/^(.*)\.xcworkspace$/){$1}
say_error "No Xcode workspace found" and return nil if workspaces.empty?
say_error "There can be only one Xcode workspace" and return nil if workspaces.length > 1
acc[:workspace] = workspace = workspaces.first
- 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"