Skip to content

Commit 908c553

Browse files
committed
Running swiftlint --fix
1 parent 6f46d76 commit 908c553

File tree

86 files changed

+1154
-1170
lines changed

Some content is hidden

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

86 files changed

+1154
-1170
lines changed

Package.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ let package = Package(
3838
.package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", from: "0.57.0")
3939
],
4040
targets: [
41-
41+
4242
// MARK: - Executable Targets
43-
43+
4444
.executableTarget(
4545
name: "public-api-diff",
4646
dependencies: [
@@ -56,17 +56,17 @@ let package = Package(
5656
.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")
5757
]
5858
),
59-
59+
6060
// MARK: - Public Modules
61-
61+
6262
.target(
6363
name: "PADSwiftInterfaceDiff",
6464
dependencies: [
6565
"PADCore",
6666
"PADLogging",
6767
"FileHandlingModule",
6868
.product(name: "SwiftSyntax", package: "swift-syntax"),
69-
.product(name: "SwiftParser", package: "swift-syntax"),
69+
.product(name: "SwiftParser", package: "swift-syntax")
7070
],
7171
path: "Sources/PublicModules/PADSwiftInterfaceDiff"
7272
),
@@ -98,9 +98,9 @@ let package = Package(
9898
dependencies: ["PADCore"],
9999
path: "Sources/PublicModules/PADOutputGenerator"
100100
),
101-
101+
102102
// MARK: - Shared/Public
103-
103+
104104
.target(
105105
name: "PADCore",
106106
path: "Sources/Shared/Public/PADCore"
@@ -115,9 +115,9 @@ let package = Package(
115115
dependencies: ["FileHandlingModule", "ShellModule", "PADLogging"],
116116
path: "Sources/Shared/Public/PADSwiftInterfaceFileLocator"
117117
),
118-
118+
119119
// MARK: - Shared/Package
120-
120+
121121
.target(
122122
name: "FileHandlingModule",
123123
path: "Sources/Shared/Package/FileHandlingModule"
@@ -131,9 +131,9 @@ let package = Package(
131131
dependencies: ["FileHandlingModule", "ShellModule", "PADLogging"],
132132
path: "Sources/Shared/Package/SwiftPackageFileHelperModule"
133133
),
134-
134+
135135
// MARK: - Test Targets
136-
136+
137137
.testTarget(
138138
name: "UnitTests",
139139
dependencies: [

ReferencePackages/ReferencePackage/Sources/ReferencePackage/ReferencePackage.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import Foundation
2424

2525
public protocol CustomProtocol {
2626
typealias CustomAssociatedType = Equatable
27-
27+
2828
var getSetVar: any CustomAssociatedType { get set }
2929
var getVar: any CustomAssociatedType { get }
3030
func function() -> any CustomAssociatedType
@@ -40,26 +40,26 @@ public struct CustomStruct: CustomProtocol {
4040
// MARK: - Generic public class
4141

4242
public class CustomClass<T: Equatable> {
43-
43+
4444
public weak var weakObject: CustomClass?
4545
lazy var lazyVar: String = { "I am a lazy" }()
4646
@_spi(SomeSpi)
4747
@_spi(AnotherSpi)
4848
open var computedVar: String { "I am computed" }
4949
package let constantLet: String = "I'm a let"
5050
public var optionalVar: T?
51-
51+
5252
@MainActor
5353
public func asyncThrowingFunc() async throws {}
5454
public func rethrowingFunc(throwingArg: @escaping () throws -> String) rethrows {}
55-
55+
5656
public init(weakObject: CustomClass? = nil, optionalVar: T? = nil) {
5757
self.weakObject = weakObject
5858
self.optionalVar = optionalVar
5959
}
60-
60+
6161
public init() {}
62-
62+
6363
public convenience init(value: T) {
6464
self.init(optionalVar: value)
6565
}
@@ -70,12 +70,12 @@ public class CustomClass<T: Equatable> {
7070
@_spi(SystemProgrammingInterface)
7171
open class OpenSpiConformingClass: CustomProtocol {
7272
public typealias CustomAssociatedType = any Equatable
73-
73+
7474
public var getSetVar: CustomAssociatedType
7575
public var getVar: CustomAssociatedType
7676
@inlinable
7777
public func function() -> CustomAssociatedType { fatalError() }
78-
78+
7979
public init(getSetVar: CustomAssociatedType, getVar: CustomAssociatedType) {
8080
self.getSetVar = getSetVar
8181
self.getVar = getVar
@@ -106,11 +106,11 @@ public actor CustomActor {}
106106

107107
public enum OperatorNamespace: String {
108108
case someValue = "1"
109-
109+
110110
public static prefix func ++ (_ counter: OperatorNamespace) -> String {
111111
counter.rawValue
112112
}
113-
113+
114114
public static postfix func ++ (_ counter: OperatorNamespace) -> String {
115115
counter.rawValue
116116
}
@@ -137,6 +137,6 @@ public enum CustomEnum {
137137
case caseWithString(String)
138138
case caseWithTuple(String, Int)
139139
case caseWithBlock((Int) throws -> Void)
140-
140+
141141
indirect case recursive(CustomEnum)
142142
}

ReferencePackages/UpdatedPackage/Sources/ReferencePackage/ReferencePackage.swift

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public protocol ParentProtocol<ParentType> {
3232
public protocol CustomProtocol<CustomAssociatedType, AnotherAssociatedType>: ParentProtocol<Double> {
3333
associatedtype CustomAssociatedType: Equatable
3434
associatedtype AnotherAssociatedType: Strideable
35-
35+
3636
var getSetVar: AnotherAssociatedType { get set }
3737
var getVar: CustomAssociatedType { get }
3838
func function() -> CustomAssociatedType
@@ -41,16 +41,16 @@ public protocol CustomProtocol<CustomAssociatedType, AnotherAssociatedType>: Par
4141
public struct CustomStruct<T: Strideable>: CustomProtocol {
4242
public typealias CustomAssociatedType = Int
4343
public typealias AnotherAssociatedType = Double
44-
public typealias Iterator = Array<AnotherAssociatedType>
45-
44+
public typealias Iterator = [AnotherAssociatedType]
45+
4646
@available(macOS, unavailable, message: "Unavailable on macOS")
4747
public struct NestedStruct {
4848
@available(*, deprecated, renamed: "nestedVar")
4949
public let nestedLet: String = "let"
5050
@available(swift, introduced: 5.9)
5151
public let nestedVar: String = "var"
5252
}
53-
53+
5454
public var getSetVar: Double
5555
public var getVar: Int
5656
@discardableResult
@@ -60,34 +60,34 @@ public struct CustomStruct<T: Strideable>: CustomProtocol {
6060
// MARK: - Generic public class
6161

6262
public class CustomClass<T: Equatable> {
63-
63+
6464
public weak var weakObject: CustomClass?
6565
public lazy var lazyVar: String = { "I am a lazy" }()
6666
@_spi(SomeSpi)
6767
@_spi(AnotherSpi)
6868
open var computedVar: String { "I am computed" }
6969
package let constantLet: String = "I'm a let"
7070
public var optionalVar: T?
71-
71+
7272
public let a = 0, b = 0, c = 0, d: Double = 5.0
73-
73+
7474
@MainActor
75-
public func asyncThrowingFunc<Element>(_ element: Element) async throws -> Void where Element: Strideable {}
75+
public func asyncThrowingFunc<Element>(_ element: Element) async throws where Element: Strideable {}
7676
public func rethrowingFunc(throwingArg: @escaping () throws -> String) rethrows {}
77-
77+
7878
public init(weakObject: CustomClass? = nil, optionalVar: T? = nil) {
7979
self.weakObject = weakObject
8080
self.optionalVar = optionalVar
81-
81+
8282
lazyVar = "Great!"
8383
}
84-
84+
8585
public init?() {}
86-
86+
8787
public convenience init!(value: T) {
8888
self.init(optionalVar: value)
8989
}
90-
90+
9191
public subscript(index: Int) -> T? {
9292
get { optionalVar }
9393
set { optionalVar = newValue }
@@ -107,13 +107,13 @@ extension Array {
107107
open class OpenSpiConformingClass<T: Equatable & Strideable>: CustomProtocol {
108108
public typealias CustomAssociatedType = T
109109
public typealias AnotherAssociatedType = T
110-
public typealias Iterator = Array<Double>
111-
110+
public typealias Iterator = [Double]
111+
112112
public var getSetVar: T
113113
public var getVar: T
114114
@inlinable
115115
public func function() -> T where T: Equatable { getVar }
116-
116+
117117
public init(getSetVar: T, getVar: T) {
118118
self.getSetVar = getSetVar
119119
self.getVar = getVar
@@ -144,11 +144,11 @@ public actor CustomActor: SimpleProtocol {}
144144

145145
public enum OperatorNamespace: String {
146146
case someValue = "1"
147-
147+
148148
public static prefix func ++ (_ counter: OperatorNamespace) -> String {
149149
counter.rawValue
150150
}
151-
151+
152152
public static postfix func ++ (_ counter: OperatorNamespace) -> String {
153153
counter.rawValue
154154
}
@@ -176,7 +176,7 @@ public enum CustomEnum<T> {
176176
case caseWithTuple(_ foo: String, bar: Int)
177177
case caseWithBlock((Int) throws -> Void)
178178
case a, b, c, d, e(NestedStructInExtension)
179-
179+
180180
indirect case recursive(CustomEnum)
181181
}
182182

@@ -186,7 +186,7 @@ public enum RawValueEnum: String {
186186
}
187187

188188
extension CustomEnum: SimpleProtocol {
189-
189+
190190
public struct NestedStructInExtension {
191191
public let string: String
192192
public init(string: String = "Hello") {
@@ -196,14 +196,14 @@ extension CustomEnum: SimpleProtocol {
196196
}
197197

198198
extension CustomEnum.NestedStructInExtension {
199-
199+
200200
var description: String {
201201
return string
202202
}
203203
}
204204

205205
public extension CustomEnum where T == String {
206-
206+
207207
var titleOfCaseWithNamedString: String? {
208208
if case let .caseWithNamedString(title) = self {
209209
return title

Sources/ExecutableTargets/CommandLineTool/CommandLineTool.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import PADSwiftInterfaceDiff
1717

1818
@main
1919
struct PublicApiDiff: AsyncParsableCommand {
20-
20+
2121
static var configuration: CommandConfiguration = .init(
2222
commandName: "public-api-diff",
2323
subcommands: [
@@ -26,14 +26,14 @@ struct PublicApiDiff: AsyncParsableCommand {
2626
FrameworkToOutputCommand.self
2727
]
2828
)
29-
29+
3030
public func run() async throws {
3131
fatalError("No sub command provided")
3232
}
3333
}
3434

3535
extension PublicApiDiff {
36-
36+
3737
static func logger(
3838
with logLevel: LogLevel,
3939
logOutputFilePath: String?
@@ -43,7 +43,7 @@ extension PublicApiDiff {
4343
loggers += [LogFileLogger(outputFilePath: logOutputFilePath)]
4444
}
4545
loggers += [SystemLogger().withLogLevel(logLevel)]
46-
46+
4747
return LoggingGroup(with: loggers)
4848
}
4949
}

0 commit comments

Comments
 (0)