Line should not have any trailing whitespace Open
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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••¬
Class names should be UpperCamelCase Open
internal class _QueryCache: Object {
- Read upRead up
- Exclude checks
upper-camel-case
class
, enum
, enum value, struct
, and protocol
names should follow UpperCamelCase naming convention : several words are joined together, and the first letter of every word is capitalized.
Class names
Preferred
class SomeClass {
// class definition goes here
}
class SomeClass : SomeSuperClass {
// class definition goes here
}
Not Preferred
class invalidClassName {
// class definition goes here
}
class inval1dCla$$Name : SomeSuperClass {
// class definition goes here
}
Enumeration types
Preferred
enum SomeEnumeration {
// enumeration definition goes here
}
Not Preferred
enum S0me_Enumer4t!on {
// enumeration definition goes here
}
Enumeration values
Preferred
enum CompassPoint {
case North
case South
case East
case West
}
Not Preferred
enum CompassPoint {
case N0rth
case Sou-th
case EAST
case We_$t
}
Struct names
Preferred
struct SomeStructure {
// structure definition goes here
}
Not Preferred
struct Some-Structure {
// structure definition goes here
}
Protocol names
Preferred
protocol SomeProtocol {
// protocol definition goes here
}
Not Preferred
protocol someprotocol {
// protocol definition goes here
}
Line should not have any trailing whitespace Open
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
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••¬