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
- Exclude checks
Closure is the function's final argument and may be passed as a trailing closure instead Open
}, { expectation in
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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"]) )
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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 ) {
- Exclude checks
Operator definitions should be followed by exactly one space Open
public static func ==(lhs: MyQuery, rhs: MyQuery) -> Bool {
- Exclude checks
Parentheses content should not end with whitespace Open
XCTAssert(parsedParams.key1 == "value1" && parsedParams.key2 == "value2" && parsedParams.key3 == "value3" )
- Exclude checks
Operator definitions should be followed by exactly one space Open
static func ==(lhs: User, rhs: User) -> Bool {
- Exclude checks
Parameter clause in closure signature should be preceded by exactly one space Open
self.performRequest("get", path: "/1/cookiedump", callback: {response in
- Exclude checks
Operator definitions should be followed by exactly one space Open
public static func ==(lhs: Nested, rhs: Nested) -> Bool {
- Exclude checks
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] })
- Read upRead up
- Exclude checks
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
- Exclude checks
Parameter clause in closure signature should be preceded by exactly one space Open
self.performRequest("invalid", path: "/qwer", callback: {response in
- Exclude checks
Parameter clause in closure signature should be preceded by exactly one space Open
}) {req in
- Exclude checks
Closure is the function's final argument and may be passed as a trailing closure instead Open
}, { expectation in
- Read upRead up
- Exclude checks
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
- Exclude checks
Parameter clause in closure signature should be preceded by exactly one space Open
self.performRequest("get", path: "/1", callback: {response in
- Exclude checks
Parameter clause in closure signature should be preceded by exactly one space Open
router.get("/3/(question)?") {_, response, next in
- Exclude checks