Close brace should be on a new line by itself.
class SomeClass: SomeSuperClass {
}
class Demo {
}
if someCondition {
}
else if someCondition {
}
else {
}
switch someCase {
default:
break
}
for var x = 0; x < 10; x+=1 {
}
for ; ; {
}
for var x ; ; {
}
for ; x ; {
}
for ; ; x {
}
for var x; x ; {
}
for var x; ; x {
}
for ; x ; x {
}
while someCondition {
}
repeat {
} while someCondition
for someElement in someCollection {
}
init(length:Double, breadth:Double) {
self.length = length
self.breadth = breadth
}
struct DemoStruct : SomeParentStruct {
}
struct DemoStruct {
}
set {
oldValue = newValue / 2
}
extension someExtension {
}
protocol someProtocol {
}
func someFunction () -> () {
// closure
}
NOTE: Closing brace checks for single-line closures will not be enforced, but closing brace checks for multiline closures are enforced.
Close brace should be on a new line by itself.
NOTE: Closing brace checks for single-line
closureswill not be enforced, but closing brace checks for multilineclosuresare enforced.