IBM-Swift/Kitura

View on GitHub

Showing 850 of 850 total issues

Parameter clause in closure signature should be preceded by exactly one space
Open

            self.performRequest("get", path: "/2/star/star", callback: {response in

Closure is the function's final argument and may be passed as a trailing closure instead
Open

        }, { expectation in

trailing-closure

Closures that are the last argument of a function should be passed into the function using trailing closure syntax.

Preferred

reversed = names.sort { s1, s2 in return s1 > s2 }

Not Preferred

reversed = names.sort({ s1, s2 in return s1 > s2 })

Closure is the function's final argument and may be passed as a trailing closure instead
Open

        }, { expectation in

trailing-closure

Closures that are the last argument of a function should be passed into the function using trailing closure syntax.

Preferred

reversed = names.sort { s1, s2 in return s1 > s2 }

Not Preferred

reversed = names.sort({ s1, s2 in return s1 > s2 })

Closure is the function's final argument and may be passed as a trailing closure instead
Open

        }, { expectation in

trailing-closure

Closures that are the last argument of a function should be passed into the function using trailing closure syntax.

Preferred

reversed = names.sort { s1, s2 in return s1 > s2 }

Not Preferred

reversed = names.sort({ s1, s2 in return s1 > s2 })

Global Constant should be either lowerCamelCase or UpperCamelCase
Open

let enable_nio = !( ["0","false"].contains(ProcessInfo.processInfo.environment["KITURA_NIO"]) )
Severity: Minor
Found in Package.swift by tailor

constant-naming

Global constants should follow either UpperCamelCase or lowerCamelCase naming conventions. Local constants should follow lowerCamelCase naming conventions.

Preferred

let MaxHeight = 42
let maxHeight = 42

Not Preferred

let max_height = 42

TODO comments should be formatted either as <todo: description> or <todo description></todo></todo:>
Open

            //TODO: Deal with this

todo-syntax

TODO comments should be defined separately using non-nested single line comments. They should adhere to the <TODO: description> or <TODO(developer-name): description> syntax. Empty TODO comments will be flagged.

Preferred

// TODO: <insert mandatory todo comment>
// TODO(dev-name): <insert mandatory todo comment></insert></insert>

Not Preferred

// TODO:

/// TODO: Documentation comments should not have TODOs

//// TODO: Nested comments should not have TODOs

// //TODO: Nested comments should not have TODOs

// TODO: Nested comments should not have TODOs // some comment

//// TODO: Nested comments should not have TODOs

Parentheses content should not end with whitespace
Open

                    functionName: String, lineNum: Int, fileName: String ) {
Severity: Minor
Found in Tests/KituraTests/PrintLogger.swift by tailor

Operator definitions should be followed by exactly one space
Open

        public static func ==(lhs: MyQuery, rhs: MyQuery) -> Bool {

Parentheses content should not end with whitespace
Open

            XCTAssert(parsedParams.key1 == "value1" && parsedParams.key2 == "value2" && parsedParams.key3 == "value3" )
Severity: Minor
Found in Tests/KituraTests/TestRequests.swift by tailor

Operator definitions should be followed by exactly one space
Open

        static func ==(lhs: User, rhs: User) -> Bool {

Parameter clause in closure signature should be preceded by exactly one space
Open

            self.performRequest("get", path: "/1/cookiedump", callback: {response in
Severity: Minor
Found in Tests/KituraTests/TestCookies.swift by tailor

Operator definitions should be followed by exactly one space
Open

        public static func ==(lhs: Nested, rhs: Nested) -> Bool {

Closure is the function's final argument and may be passed as a trailing closure instead
Open

        let expectedIntData: [[String: User]] = intTuple.map({ [$0.value: $1] })

trailing-closure

Closures that are the last argument of a function should be passed into the function using trailing closure syntax.

Preferred

reversed = names.sort { s1, s2 in return s1 > s2 }

Not Preferred

reversed = names.sort({ s1, s2 in return s1 > s2 })

Parameter clause in closure signature should be preceded by exactly one space
Open

        router.get("/1/cookiedump") {request, response, next in
Severity: Minor
Found in Tests/KituraTests/TestCookies.swift by tailor

Parameter clause in closure signature should be preceded by exactly one space
Open

            self.performRequest("invalid", path: "/qwer", callback: {response in
Severity: Minor
Found in Tests/KituraTests/TestErrors.swift by tailor

Parameter clause in closure signature should be preceded by exactly one space
Open

            }) {req in
Severity: Minor
Found in Tests/KituraTests/TestErrors.swift by tailor

Closure is the function's final argument and may be passed as a trailing closure instead
Open

        }, { expectation in
Severity: Minor
Found in Tests/KituraTests/TestCookies.swift by tailor

trailing-closure

Closures that are the last argument of a function should be passed into the function using trailing closure syntax.

Preferred

reversed = names.sort { s1, s2 in return s1 > s2 }

Not Preferred

reversed = names.sort({ s1, s2 in return s1 > s2 })

Parameter clause in closure signature should be preceded by exactly one space
Open

        router.get("/3/sendcookie") {request, response, next in
Severity: Minor
Found in Tests/KituraTests/TestCookies.swift by tailor

Parameter clause in closure signature should be preceded by exactly one space
Open

            self.performRequest("get", path: "/1", callback: {response in

Parameter clause in closure signature should be preceded by exactly one space
Open

        router.get("/3/(question)?") {_, response, next in
Severity
Category
Status
Source
Language