SwiftVersion
public struct SwiftVersion : RawRepresentable, Codable, VersionComparable, Sendable
A value describing the version of the Swift compiler.
-
Declaration
Swift
public typealias RawValue = String
-
Declaration
Swift
public let rawValue: String
-
Declaration
Swift
public init(rawValue: String)
-
Swift 5.0.x - https://swift.org/download/#swift-50
Declaration
Swift
static let five: SwiftVersion
-
Swift 5.1.x - https://swift.org/download/#swift-51
Declaration
Swift
static let fiveDotOne: SwiftVersion
-
Swift 5.2.x - https://swift.org/download/#swift-52
Declaration
Swift
static let fiveDotTwo: SwiftVersion
-
Swift 5.3.x - https://swift.org/download/#swift-53
Declaration
Swift
static let fiveDotThree: SwiftVersion
-
Swift 5.4.x - https://swift.org/download/#swift-54
Declaration
Swift
static let fiveDotFour: SwiftVersion
-
Swift 5.5.x - https://swift.org/download/#swift-55
Declaration
Swift
static let fiveDotFive: SwiftVersion
-
Swift 5.6.x - https://swift.org/download/#swift-56
Declaration
Swift
static let fiveDotSix: SwiftVersion
-
Swift 5.7.x - https://swift.org/download/#swift-57
Declaration
Swift
static let fiveDotSeven: SwiftVersion
-
Swift 5.8.x - https://swift.org/download/#swift-58
Declaration
Swift
static let fiveDotEight: SwiftVersion
-
Swift 5.9.x - https://swift.org/download/#swift-59
Declaration
Swift
static let fiveDotNine: SwiftVersion
-
The current detected Swift compiler version, based on the currently accessible SourceKit version.
Note
Override by setting theSWIFTLINT_SWIFT_VERSION
environment variable.Declaration
Swift
static let current: SwiftVersion