Showing 7 of 7 total issues
Function main
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
func main() throws -> ReturnCode {
printVersion()
let arguments = argumentsService.processArguments(CommandLine.arguments)
let xcode11URL = URL(fileURLWithPath: xcode11Path)
guard argumentsService.argumentsValid(arguments),
Function main
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
func main() throws -> ReturnCode {
printVersion()
let arguments = argumentsService.processArguments(CommandLine.arguments)
let xcode11URL = URL(fileURLWithPath: xcode11Path)
guard argumentsService.argumentsValid(arguments),
- 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
Function processArguments
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
func processArguments(_ arguments: [String]) -> [Argument<Any>] {
var parsingMode: Argument<Any>.Key?
var result: [Argument<Any>] = []
for i in 1 ..< CommandLine.arguments.count {
- 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
Function performUpload
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private func performUpload(task uploadTask: Task, notifyOnlyOnFailure: Bool = false, verboseOnFailure: Bool = false)
throws -> ReturnCode {
var returnCode: ReturnCode = ReturnCode.itmsTransporterDidNotComplete
let output = try taskService.run(task: uploadTask)
if output.lowercased().contains("error itms") {
- 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
Avoid too many return
statements within this function. Open
return ReturnCode.fileDoesNotExist
Avoid too many return
statements within this function. Open
return try performUpload(task: transporterTask, notifyOnlyOnFailure: notifyOnlyOnFailure,
verboseOnFailure: verboseOnFailure)
Avoid too many return
statements within this function. Open
return try performUpload(task: transporterTask, notifyOnlyOnFailure: notifyOnlyOnFailure,
verboseOnFailure: verboseOnFailure)