-
Notifications
You must be signed in to change notification settings - Fork 48
Enforce bracket styles (Part 1) #86
Copy link
Copy link
Closed
Description
Related issues: #96, #100, #132, #135
Open brace should be on same line as statement
- class
class SomeClass: SomeSuperClass {
}
class Demo {
}- function
func someMethod() {
}- conditional
if someCondition {
}
else if someCondition {
}
else {
}
switch someCase {
default:
break
}- loops
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 {
}- initializer
init(length:Double, breadth:Double) {
self.length = length
self.breadth = breadth
}- struct
struct DemoStruct : SomeParentStruct {
}
struct DemoStruct {
}Reactions are currently unavailable