Skip to content

Commit da16c1c

Browse files
authored
Update README.md
1 parent d08e0b8 commit da16c1c

File tree

1 file changed

+32
-21
lines changed

1 file changed

+32
-21
lines changed

README.md

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2118,7 +2118,7 @@ _You can enable the following settings in Xcode by running [this script](resourc
21182118

21192119
</details>
21202120

2121-
* <a id='long-function-invocation'></a>(<a href='#long-function-invocation'>link</a>) **[Long](https://github.com/airbnb/swift#column-width) function invocations should also break on each argument.** Put the closing parenthesis on the last line of the invocation. [![SwiftFormat: wrapArguments](https://img.shields.io/badge/SwiftFormat-wrapArguments-7B0051.svg)](https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrapArguments)
2121+
* <a id='long-function-invocation'></a>(<a href='#long-function-invocation'>link</a>) **[Long](https://github.com/airbnb/swift#column-width) function calls should also break on each argument.** Put the closing parenthesis on its own line. [![SwiftFormat: wrapArguments](https://img.shields.io/badge/SwiftFormat-wrapArguments-7B0051.svg)](https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrapArguments)
21222122

21232123
<details>
21242124

@@ -2137,8 +2137,7 @@ _You can enable the following settings in Xcode by running [this script](resourc
21372137
at: location,
21382138
count: 5,
21392139
color: starColor,
2140-
withAverageDistance: 4
2141-
)
2140+
withAverageDistance: 4)
21422141

21432142
// WRONG
21442143
universe.generate(5,
@@ -2150,13 +2149,15 @@ _You can enable the following settings in Xcode by running [this script](resourc
21502149
at: location,
21512150
count: 5,
21522151
color: starColor,
2153-
withAverageDistance: 4)
2152+
withAverageDistance: 4
2153+
)
21542154

21552155
// RIGHT
21562156
universe.generate(
21572157
5,
21582158
.stars,
2159-
at: location)
2159+
at: location
2160+
)
21602161
```
21612162

21622163
</details>
@@ -2193,7 +2194,8 @@ _You can enable the following settings in Xcode by running [this script](resourc
21932194
universe.generateStars(
21942195
at: location,
21952196
count: count,
2196-
withAverageDistance: averageDistance)
2197+
withAverageDistance: averageDistance
2198+
)
21972199
}
21982200
```
21992201

@@ -2222,7 +2224,8 @@ _You can enable the following settings in Xcode by running [this script](resourc
22222224
universe.generateStars(
22232225
at: location,
22242226
count: count,
2225-
withAverageDistance: averageDistance)
2227+
withAverageDistance: averageDistance
2228+
)
22262229
}
22272230
```
22282231

@@ -2427,16 +2430,18 @@ _You can enable the following settings in Xcode by running [this script](resourc
24272430

24282431
func colonizePlanet() {
24292432
spaceship.travel(to: planet, onArrival: { [weak self] in
2430-
guard let self else { return }
2431-
planet.colonize()
2432-
})
2433+
guard let self else { return }
2434+
planet.colonize()
2435+
}
2436+
)
24332437
}
24342438

24352439
func exploreSystem() {
24362440
spaceship.travel(to: planet, nextDestination: { [weak self] in
2437-
guard let self else { return nil }
2438-
return planet.moons?.first
2439-
})
2441+
guard let self else { return nil }
2442+
return planet.moons?.first
2443+
}
2444+
)
24402445
}
24412446
}
24422447
```
@@ -2451,14 +2456,16 @@ _You can enable the following settings in Xcode by running [this script](resourc
24512456

24522457
func colonizePlanet() {
24532458
spaceship.travel(to: planet, onArrival: { [planet] in
2454-
planet.colonize()
2455-
})
2459+
planet.colonize()
2460+
}
2461+
)
24562462
}
24572463

24582464
func exploreSystem() {
24592465
spaceship.travel(to: planet, nextDestination: { [planet] in
2460-
planet.moons?.first
2461-
})
2466+
planet.moons?.first
2467+
}
2468+
)
24622469
}
24632470
}
24642471
```
@@ -3237,14 +3244,16 @@ _You can enable the following settings in Xcode by running [this script](resourc
32373244
var size: CGSize {
32383245
CGSize(
32393246
width: 100.0,
3240-
height: 100.0)
3247+
height: 100.0
3248+
)
32413249
}
32423250

32433251
func makeInfoAlert(message: String) -> UIAlertController {
32443252
UIAlertController(
32453253
title: "ℹ️ Info",
32463254
message: message,
3247-
preferredStyle: .alert)
3255+
preferredStyle: .alert
3256+
)
32483257
}
32493258

32503259
var alertTitle: String {
@@ -3384,7 +3393,8 @@ _You can enable the following settings in Xcode by running [this script](resourc
33843393
at: location,
33853394
count: 5,
33863395
color: starColor,
3387-
withAverageDistance: 4)
3396+
withAverageDistance: 4
3397+
)
33883398
```
33893399

33903400
</details>
@@ -4268,7 +4278,8 @@ _You can enable the following settings in Xcode by running [this script](resourc
42684278
acceptButton.addTarget(
42694279
self,
42704280
action: #selector(didTapAcceptButton),
4271-
forControlEvents: .touchUpInside)
4281+
forControlEvents: .touchUpInside
4282+
)
42724283
}
42734284

42744285
@objc

0 commit comments

Comments
 (0)