IBM-Swift/Kitura

View on GitHub

Showing 850 of 850 total issues

Parentheses content should not end with whitespace
Open

func postAppleHandler(posted: Apple, completion: (Apple?, RequestError?) -> Void ) -> Void {

Parentheses content should not end with whitespace
Open

func patchSingleAppleHandler(id: Int, posted: Apple, completion: (Apple?, RequestError?) -> Void ) -> Void {

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

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

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

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

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/TestRequests.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

            self.performRequest("post", path: "/bodytest", callback: {response in
Severity: Minor
Found in Tests/KituraTests/TestResponse.swift by tailor

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

            self.performRequest("post", path: "/bodytesthardway", callback: {response in
Severity: Minor
Found in Tests/KituraTests/TestResponse.swift by tailor

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 })

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 })

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

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

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

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

Parentheses content should not end with whitespace
Open

func getQueryUglifruitHandler3(query: QueryIntFieldOptionalParam, completion: (Uglifruit?, RequestError?) -> Void ) -> Void {

Parentheses content should not end with whitespace
Open

func getQueryUglifruitHandler4(query: QueryIntFieldArrayParam, completion: (Uglifruit?, RequestError?) -> Void ) -> Void {

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/TestRequests.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 })

Operator definitions should be followed by exactly one space
Open

        static func ==(lhs: SomeJSON, rhs: SomeJSON) -> Bool {
Severity: Minor
Found in Tests/KituraTests/TestResponse.swift by tailor

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

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

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 })
Severity
Category
Status
Source
Language