Skip to content

Commit 690a12d

Browse files
authored
SwiftFormat: unspaced ranges (#166)
1 parent 9ae9d85 commit 690a12d

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.swiftformat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
--disable redundantNilInit,redundantSelf,redundantType,unusedArguments
1+
--disable redundantNilInit,redundantSelf,redundantType,unusedArguments,indent
22

33
--header strip
4-
--indent tab
5-
--ifdef no-indent
64
--extensionacl on-declarations
75
--patternlet inline
6+
--ranges no-space
7+
--trailing-commas always

Examples/Demo/Demo/Pages.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ struct PageLink: View {
126126
var body: some View {
127127
ZStack {
128128
RoundedRectangle(cornerRadius: 6, style: .continuous)
129-
#if !os(tvOS) && !os(visionOS)
129+
#if !os(tvOS) && !os(visionOS)
130130
.fill(Color.blue.opacity(0.8))
131-
#else
131+
#else
132132
.fill(Color.clear)
133-
#endif
133+
#endif
134134
Text(title)
135-
#if !os(tvOS)
135+
#if !os(tvOS)
136136
.foregroundColor(.white)
137-
#endif
137+
#endif
138138
.font(.system(size: 18, weight: .medium, design: .rounded))
139139
}
140140
.frame(maxHeight: 50)
@@ -163,9 +163,9 @@ struct Code<Content: StringProtocol>: View {
163163
.minimumScaleFactor(0.5)
164164
.font(.system(size: 14, design: .monospaced))
165165
.background(shape.stroke(Color(white: 0.1).opacity(0.35), lineWidth: 1))
166-
.background(Color(white: 0.94).opacity(0.6).clipShape(shape))
167-
#if !os(tvOS)
166+
#if !os(tvOS)
168167
.textSelection(.enabled)
169-
#endif
168+
#endif
169+
.background(Color(white: 0.94).opacity(0.6).clipShape(shape))
170170
}
171171
}

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ package.dependencies = [
6565
.package(url: "https://github.com/davdroman/swift-once-macro", from: "1.0.0"),
6666
.package(url: "https://github.com/pointfreeco/swift-custom-dump", from: "1.0.0"), // dev
6767
.package(url: "https://github.com/pointfreeco/xctest-dynamic-overlay", from: "1.0.0"),
68-
.package(url: "https://github.com/siteline/swiftui-introspect", "1.3.0" ..< "27.0.0"),
68+
.package(url: "https://github.com/siteline/swiftui-introspect", "1.3.0"..<"27.0.0"),
6969
]
7070

7171
for target in package.targets {

0 commit comments

Comments
 (0)