Kinvey/swift-sdk

View on GitHub

Showing 2,011 of 2,013 total issues

Line should not have any trailing whitespace
Open

            

trailing-whitespace

Flag whitespace after the last non-whitespace character on each line until the newline.

Preferred

let number = 42¬

Not Preferred

let number = 42••¬

Line should not have any trailing whitespace
Open

                    

trailing-whitespace

Flag whitespace after the last non-whitespace character on each line until the newline.

Preferred

let number = 42¬

Not Preferred

let number = 42••¬

Line should not have any trailing whitespace
Open

                

trailing-whitespace

Flag whitespace after the last non-whitespace character on each line until the newline.

Preferred

let number = 42¬

Not Preferred

let number = 42••¬

Colon at column 23 should have no spaces before it
Open

            "MA20128" : 46068,

colon-whitespace

There should be no whitespace preceding the colon, exactly one whitespace after the colon for: * var, class, struct, protocol, extension, func, and tuple declarations * dict literals and types * case statements

However, for conditional expressions there should be a single whitespace before and after the colon.

Variable declarations

Preferred

var x: Int = 2

Not Preferred

var x : Int
var y:   String

Dictionary literals and types

Preferred

var x = [ 'key1': 1, 'key2': 2 ]
var y: [ Int: String ]

Not Preferred

var x = [ 'key1' : 1, 'key2':  3]
var y: [ Int :    String ]

Case statements

Preferred

switch character {
case "a": doSomething(a);
default: alert();
}

Not Preferred

switch character {
case "a" : doSomething(a);
default:     alert();
}

Class, Struct, Protocol, and Extension declarations

Preferred

class ClassName: BaseClass {
}

struct StructName: BaseStruct {
}

protocol ProtocolName: AnotherProtocol {
}

extension TypeName: ProtocolName {
}

Not Preferred

class ClassName : BaseClass {
}

struct StructName:  BaseStruct {
}

protocol ProtocolName:AnotherProtocol {
}

extension TypeName : ProtocolName {
}

Tuple declarations

Preferred

var y = (key: 1, value: 2)

Not Preferred

var y = (key:1, value : 2)

Function declarations

Preferred

func someFunction<t: someclass u: someprotocol>(someT: T, someU: U) {
}</t:>

Not Preferred

func someFunction<t : someclass u:someprotocol>(someT: T, someU: U) {
}</t>

Conditional expressions

Preferred

var x = condition ? a : b

Not Preferred

var x = condition ? a: b
var x = condition ? a   : b

Line should not have any trailing whitespace
Open

            

trailing-whitespace

Flag whitespace after the last non-whitespace character on each line until the newline.

Preferred

let number = 42¬

Not Preferred

let number = 42••¬

Line should not have any trailing whitespace
Open

            

trailing-whitespace

Flag whitespace after the last non-whitespace character on each line until the newline.

Preferred

let number = 42¬

Not Preferred

let number = 42••¬

Line should not have any trailing whitespace
Open

        

trailing-whitespace

Flag whitespace after the last non-whitespace character on each line until the newline.

Preferred

let number = 42¬

Not Preferred

let number = 42••¬

Colon at column 23 should have no spaces before it
Open

            "MA09208" : 41688,

colon-whitespace

There should be no whitespace preceding the colon, exactly one whitespace after the colon for: * var, class, struct, protocol, extension, func, and tuple declarations * dict literals and types * case statements

However, for conditional expressions there should be a single whitespace before and after the colon.

Variable declarations

Preferred

var x: Int = 2

Not Preferred

var x : Int
var y:   String

Dictionary literals and types

Preferred

var x = [ 'key1': 1, 'key2': 2 ]
var y: [ Int: String ]

Not Preferred

var x = [ 'key1' : 1, 'key2':  3]
var y: [ Int :    String ]

Case statements

Preferred

switch character {
case "a": doSomething(a);
default: alert();
}

Not Preferred

switch character {
case "a" : doSomething(a);
default:     alert();
}

Class, Struct, Protocol, and Extension declarations

Preferred

class ClassName: BaseClass {
}

struct StructName: BaseStruct {
}

protocol ProtocolName: AnotherProtocol {
}

extension TypeName: ProtocolName {
}

Not Preferred

class ClassName : BaseClass {
}

struct StructName:  BaseStruct {
}

protocol ProtocolName:AnotherProtocol {
}

extension TypeName : ProtocolName {
}

Tuple declarations

Preferred

var y = (key: 1, value: 2)

Not Preferred

var y = (key:1, value : 2)

Function declarations

Preferred

func someFunction<t: someclass u: someprotocol>(someT: T, someU: U) {
}</t:>

Not Preferred

func someFunction<t : someclass u:someprotocol>(someT: T, someU: U) {
}</t>

Conditional expressions

Preferred

var x = condition ? a : b

Not Preferred

var x = condition ? a: b
var x = condition ? a   : b

Line should not have any trailing whitespace
Open

        

trailing-whitespace

Flag whitespace after the last non-whitespace character on each line until the newline.

Preferred

let number = 42¬

Not Preferred

let number = 42••¬

Line should not have any trailing whitespace
Open

        

trailing-whitespace

Flag whitespace after the last non-whitespace character on each line until the newline.

Preferred

let number = 42¬

Not Preferred

let number = 42••¬

Line should not have any trailing whitespace
Open

    

trailing-whitespace

Flag whitespace after the last non-whitespace character on each line until the newline.

Preferred

let number = 42¬

Not Preferred

let number = 42••¬
Severity
Category
Status
Source
Language