mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
d73ee8d3d9
Also removes `missing_docs` and `valid_docs` rules. Fixes #1453.
25 lines
547 B
Swift
25 lines
547 B
Swift
//
|
|
// SwiftVersion.swift
|
|
// SwiftLint
|
|
//
|
|
// Created by Marcelo Fabri on 12/29/16.
|
|
// Copyright © 2016 Realm. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
enum SwiftVersion {
|
|
case three
|
|
|
|
static let current: SwiftVersion = {
|
|
// Allow forcing the Swift version, useful in cases where SourceKit isn't available
|
|
if let envVersion = ProcessInfo.processInfo.environment["SWIFTLINT_SWIFT_VERSION"] {
|
|
switch envVersion {
|
|
default: return .three
|
|
}
|
|
}
|
|
|
|
return .three
|
|
}()
|
|
}
|