Skip to content

Commit 5df3432

Browse files
[CI] Lint everything (#963)
1 parent 03c12c9 commit 5df3432

File tree

92 files changed

+750
-461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+750
-461
lines changed

.swiftformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@
8181
--wrapcollections before-first
8282

8383
# Exclude paths
84-
--exclude **/Generated,**/generated,**/protobuf,**/OpenApi
84+
--exclude **/Generated,**/generated,**/protobuf,**/OpenApi,vendor/bundle,Pods,spm_cache,derived_data,.build

.swiftlint.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# Directory and file filters
2-
included:
3-
- Sources
4-
- DemoApp
5-
- DemoAppUIKit
62
excluded:
73
- Tests/SwiftLintFrameworkTests/Resources
84
- Sources/StreamVideo/Generated
95
- Sources/StreamVideo/OpenApi
106
- Sources/StreamVideo/protobuf
117
- Sources/StreamVideoSwiftUI/Generated
8+
- DocumentationTests
9+
- Pods
10+
- .build
11+
- spm_cache
12+
- vendor/bundle
13+
- derived_data
1214

1315
# Custom Rules
1416
custom_rules:
@@ -26,4 +28,4 @@ custom_rules:
2628
# Enabled/disabled rules
2729
only_rules:
2830
- unhandled_throwing_task
29-
# - custom_rules
31+
# - custom_rules

CallIntent/IntentHandler.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
import Intents
66

77
class IntentHandler: INExtension, INStartCallIntentHandling {
8-
override func handler(for intent: INIntent) -> Any {
9-
return self
10-
}
8+
override func handler(for intent: INIntent) -> Any {
9+
return self
10+
}
1111

12-
func handle(intent: INStartCallIntent, completion: @escaping (INStartCallIntentResponse) -> Void) {
13-
let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartCallIntent.self))
14-
let response = INStartCallIntentResponse(code: .continueInApp, userActivity: userActivity)
12+
func handle(intent: INStartCallIntent, completion: @escaping (INStartCallIntentResponse) -> Void) {
13+
let userActivity = NSUserActivity(activityType: NSStringFromClass(INStartCallIntent.self))
14+
let response = INStartCallIntentResponse(code: .continueInApp, userActivity: userActivity)
1515

16-
completion(response)
17-
}
16+
completion(response)
17+
}
1818
}

DocumentationTests/DocumentationTests/DocumentationTests/01-basics/03-quickstart.swift

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
import SwiftUI
1+
//
2+
// Copyright © 2025 Stream.io Inc. All rights reserved.
3+
//
4+
25
import StreamVideo
36
import StreamVideoSwiftUI
7+
import SwiftUI
48

5-
fileprivate func content() {
9+
private func content() {
610
container {
711
struct VideoDemoSwiftUIApp: View {
812

@@ -53,7 +57,7 @@ fileprivate func content() {
5357
callViewModel.startCall(
5458
callType: "default",
5559
callId: callId,
56-
members: [/* Your list of participants goes here. */]
60+
members: [ /* Your list of participants goes here. */ ]
5761
)
5862
} label: {
5963
Text("Start a call")
@@ -127,7 +131,7 @@ fileprivate func content() {
127131
callViewModel.startCall(
128132
callType: "default",
129133
callId: callId,
130-
members: [/* Your list of participants goes here. */]
134+
members: [ /* Your list of participants goes here. */ ]
131135
)
132136
} label: {
133137
Text("Start a call")
@@ -137,7 +141,5 @@ fileprivate func content() {
137141
.modifier(CallModifier(viewFactory: CustomViewFactory(), viewModel: callViewModel))
138142
}
139143
}
140-
141144
}
142-
143145
}

DocumentationTests/DocumentationTests/DocumentationTests/03-guides/01-client-auth.swift

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
//
2+
// Copyright © 2025 Stream.io Inc. All rights reserved.
3+
//
4+
15
import StreamVideo
26

3-
fileprivate enum First {
7+
private enum First {
48
static let streamVideo = StreamVideo(
59
apiKey: apiKey,
610
user: user,
@@ -9,7 +13,7 @@ fileprivate enum First {
913
)
1014
}
1115

12-
fileprivate enum Second {
16+
private enum Second {
1317
static let streamVideo = StreamVideo(
1418
apiKey: apiKey,
1519
user: .guest("guest"),
@@ -18,7 +22,7 @@ fileprivate enum Second {
1822
)
1923
}
2024

21-
fileprivate enum Third {
25+
private enum Third {
2226
static let streamVideo = StreamVideo(
2327
apiKey: apiKey,
2428
user: .anonymous,
@@ -27,7 +31,7 @@ fileprivate enum Third {
2731
)
2832
}
2933

30-
fileprivate enum Fourth {
34+
private enum Fourth {
3135
static let streamVideo = StreamVideo(
3236
apiKey: apiKey,
3337
user: user,

DocumentationTests/DocumentationTests/DocumentationTests/03-guides/02-joining-creating-calls.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
//
2+
// Copyright © 2025 Stream.io Inc. All rights reserved.
3+
//
4+
15
import StreamVideo
26

3-
fileprivate func content() {
7+
private func content() {
48
asyncContainer {
59
let call = streamVideo.call(callType: "default", callId: "123")
610
let result = try await call.create()

DocumentationTests/DocumentationTests/DocumentationTests/03-guides/03-call-and-participant-state.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
//
2+
// Copyright © 2025 Stream.io Inc. All rights reserved.
3+
//
4+
15
import StreamVideo
26
import StreamVideoSwiftUI
37

48
@MainActor
5-
fileprivate func content() {
9+
private func content() {
610
container {
711
let clientState = streamVideo.state
812
let callState = call.state
@@ -17,7 +21,7 @@ fileprivate func content() {
1721
}
1822

1923
container {
20-
let cancellable = call.state.$participants.sink { participants in
24+
let cancellable = call.state.$participants.sink { _ in
2125
// ..
2226
}
2327

DocumentationTests/DocumentationTests/DocumentationTests/03-guides/04-camera-and-microphone.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
//
2+
// Copyright © 2025 Stream.io Inc. All rights reserved.
3+
//
4+
15
import StreamVideo
26
import StreamVideoSwiftUI
37

48
@MainActor
5-
fileprivate func content() {
9+
private func content() {
610
container {
711
let call = streamVideo.call(callType: "default", callId: "123")
812
let camera = call.camera

DocumentationTests/DocumentationTests/DocumentationTests/03-guides/06-querying-calls.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
//
2+
// Copyright © 2025 Stream.io Inc. All rights reserved.
3+
//
4+
5+
import Combine
16
import StreamVideo
27
import StreamVideoSwiftUI
38
import SwiftUI
4-
import Combine
59

610
@MainActor
7-
fileprivate func content() {
11+
private func content() {
812
asyncContainer {
913
let filters: [String: RawJSON] = ["ended_at": .nil]
1014
let sort = [SortParamRequest.descending("created_at")]
@@ -90,7 +94,7 @@ fileprivate func content() {
9094

9195
ScrollView {
9296
LazyVStack {
93-
ForEach(callsViewModel.calls, id: \.callId) { call in
97+
ForEach(callsViewModel.calls, id: \.callId) { _ in
9498
CallView(viewFactory: viewFactory, viewModel: viewModel)
9599
.padding(.vertical, 4)
96100
}

DocumentationTests/DocumentationTests/DocumentationTests/03-guides/07-dependency-injection.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
//
2+
// Copyright © 2025 Stream.io Inc. All rights reserved.
3+
//
4+
5+
import Combine
16
import StreamVideo
27
import StreamVideoSwiftUI
38
import SwiftUI
4-
import Combine
59

610
@MainActor
7-
fileprivate func content() {
11+
private func content() {
812
container {
913
@Injected(\.streamVideo) var streamVideo
1014
@Injected(\.fonts) var fonts

0 commit comments

Comments
 (0)