Skip to content

Commit 25e59d3

Browse files
fabianfetttomerd
andauthored
Swiftformat: Extension ACL must be on declaration. (#10)
* Swiftformat: Extension ACL must be on declaration. * Use newer swiftformat version. Co-authored-by: tomer doron <[email protected]>
1 parent af01fac commit 25e59d3

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.swiftformat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@
99
--patternlet inline
1010
--stripunusedargs unnamed-only
1111
--ifdef no-indent
12+
--extensionacl on-declarations
13+
--disable typeSugar
1214

1315
# rules

Sources/SystemMetrics/SystemMetrics.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ public enum SystemMetrics {
335335
}
336336
}
337337

338-
private extension Array where Element == String {
339-
subscript(safe index: Int) -> String {
338+
extension Array where Element == String {
339+
fileprivate subscript(safe index: Int) -> String {
340340
guard index >= 0, index < endIndex else {
341341
return ""
342342
}

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN echo 'export PATH="$HOME/.tools:$PATH"' >> $HOME/.profile
2626

2727
# swiftformat (until part of the toolchain)
2828

29-
ARG swiftformat_version=0.44.6
29+
ARG swiftformat_version=0.47.4
3030
RUN git clone --branch $swiftformat_version --depth 1 https://github.com/nicklockwood/SwiftFormat $HOME/.tools/swift-format
3131
RUN cd $HOME/.tools/swift-format && swift build -c release
3232
RUN ln -s $HOME/.tools/swift-format/.build/release/swiftformat $HOME/.tools/swiftformat

0 commit comments

Comments
 (0)