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
Declaration
Swift
static let five: SwiftVersion
-
Swift 5.1
Declaration
Swift
static let fiveDotOne: SwiftVersion
-
Swift 5.2
Declaration
Swift
static let fiveDotTwo: SwiftVersion
-
Swift 5.3
Declaration
Swift
static let fiveDotThree: SwiftVersion
-
Swift 5.4
Declaration
Swift
static let fiveDotFour: SwiftVersion
-
Swift 5.5
Declaration
Swift
static let fiveDotFive: SwiftVersion
-
Swift 5.6
Declaration
Swift
static let fiveDotSix: SwiftVersion
-
Swift 5.7
Declaration
Swift
static let fiveDotSeven: SwiftVersion
-
Swift 5.8
Declaration
Swift
static let fiveDotEight: SwiftVersion
-
Swift 5.9
Declaration
Swift
static let fiveDotNine: SwiftVersion
-
Swift 6
Declaration
Swift
static let six: 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