You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-31Lines changed: 46 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -1633,7 +1633,8 @@ _You can enable the following settings in Xcode by running [this script](resourc
1633
1633
classPlanet {
1634
1634
functerraform(
1635
1635
atmosphereOptions: AtmosphereOptions = .default,
1636
-
oceanOptions: OceanOptions = .default) {
1636
+
oceanOptions: OceanOptions = .default
1637
+
) {
1637
1638
generateAtmosphere(atmosphereOptions)
1638
1639
generateOceans(oceanOptions)
1639
1640
}
@@ -1650,8 +1651,8 @@ _You can enable the following settings in Xcode by running [this script](resourc
1650
1651
classPlanet {
1651
1652
functerraform(
1652
1653
atmosphereOptions: AtmosphereOptions = .default,
1653
-
oceanOptions: OceanOptions = .default)
1654
-
{
1654
+
oceanOptions: OceanOptions = .default
1655
+
) {
1655
1656
generateAtmosphere(atmosphereOptions)
1656
1657
generateOceans(oceanOptions)
1657
1658
}
@@ -2115,7 +2116,7 @@ _You can enable the following settings in Xcode by running [this script](resourc
2115
2116
2116
2117
</details>
2117
2118
2118
-
*<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. [](https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrapArguments)
2119
+
*<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. [](https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md#wrapArguments)
2119
2120
2120
2121
<details>
2121
2122
@@ -2134,8 +2135,7 @@ _You can enable the following settings in Xcode by running [this script](resourc
2134
2135
at: location,
2135
2136
count: 5,
2136
2137
color: starColor,
2137
-
withAverageDistance: 4
2138
-
)
2138
+
withAverageDistance: 4)
2139
2139
2140
2140
// WRONG
2141
2141
universe.generate(5,
@@ -2147,13 +2147,15 @@ _You can enable the following settings in Xcode by running [this script](resourc
2147
2147
at: location,
2148
2148
count: 5,
2149
2149
color: starColor,
2150
-
withAverageDistance: 4)
2150
+
withAverageDistance: 4
2151
+
)
2151
2152
2152
2153
// RIGHT
2153
2154
universe.generate(
2154
2155
5,
2155
2156
.stars,
2156
-
at: location)
2157
+
at: location
2158
+
)
2157
2159
```
2158
2160
2159
2161
</details>
@@ -2184,13 +2186,14 @@ _You can enable the following settings in Xcode by running [this script](resourc
2184
2186
at location: Point,
2185
2187
count: Int,
2186
2188
color: StarColor,
2187
-
withAverageDistance averageDistance:Float)
2188
-
{
2189
+
withAverageDistance averageDistance:Float
2190
+
) {
2189
2191
let universe =generateUniverse()
2190
2192
universe.generateStars(
2191
2193
at: location,
2192
2194
count: count,
2193
-
withAverageDistance: averageDistance)
2195
+
withAverageDistance: averageDistance
2196
+
)
2194
2197
}
2195
2198
```
2196
2199
@@ -2213,13 +2216,14 @@ _You can enable the following settings in Xcode by running [this script](resourc
2213
2216
at location: Point,
2214
2217
count: Int,
2215
2218
color _: StarColor,
2216
-
withAverageDistance averageDistance:Float)
2217
-
{
2219
+
withAverageDistance averageDistance:Float
2220
+
) {
2218
2221
let universe =generateUniverse()
2219
2222
universe.generateStars(
2220
2223
at: location,
2221
2224
count: count,
2222
-
withAverageDistance: averageDistance)
2225
+
withAverageDistance: averageDistance
2226
+
)
2223
2227
}
2224
2228
```
2225
2229
@@ -2424,16 +2428,18 @@ _You can enable the following settings in Xcode by running [this script](resourc
2424
2428
2425
2429
funccolonizePlanet() {
2426
2430
spaceship.travel(to: planet, onArrival: { [weakself] in
2427
-
guardletselfelse { return }
2428
-
planet.colonize()
2429
-
})
2431
+
guardletselfelse { return }
2432
+
planet.colonize()
2433
+
}
2434
+
)
2430
2435
}
2431
2436
2432
2437
funcexploreSystem() {
2433
2438
spaceship.travel(to: planet, nextDestination: { [weakself] in
2434
-
guardletselfelse { returnnil }
2435
-
return planet.moons?.first
2436
-
})
2439
+
guardletselfelse { returnnil }
2440
+
return planet.moons?.first
2441
+
}
2442
+
)
2437
2443
}
2438
2444
}
2439
2445
```
@@ -2448,14 +2454,16 @@ _You can enable the following settings in Xcode by running [this script](resourc
2448
2454
2449
2455
funccolonizePlanet() {
2450
2456
spaceship.travel(to: planet, onArrival: { [planet] in
2451
-
planet.colonize()
2452
-
})
2457
+
planet.colonize()
2458
+
}
2459
+
)
2453
2460
}
2454
2461
2455
2462
funcexploreSystem() {
2456
2463
spaceship.travel(to: planet, nextDestination: { [planet] in
2457
-
planet.moons?.first
2458
-
})
2464
+
planet.moons?.first
2465
+
}
2466
+
)
2459
2467
}
2460
2468
}
2461
2469
```
@@ -3201,14 +3209,16 @@ _You can enable the following settings in Xcode by running [this script](resourc
0 commit comments