Remove support for compiling with 5.0.x (#3180)

* Remove support for compiling with 5.0.x

* fixup! Remove support for compiling with 5.0.x
This commit is contained in:
JP Simard 2020-04-14 08:46:23 -07:00 committed by GitHub
parent ef4a37ee1e
commit 889dc49bb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 11 deletions

View File

@ -2,7 +2,8 @@
#### Breaking #### Breaking
* None. * SwiftLint now requires Swift 5.1 or higher to build.
[JP Simard](https://github.com/jpsim)
#### Experimental #### Experimental
@ -10,7 +11,8 @@
#### Enhancements #### Enhancements
* JUnit reporter for GitLab artifact:report:junit with better representation of found issues. * JUnit reporter for GitLab artifact:report:junit with better representation of
found issues.
[krin-san](https://github.com/krin-san) [krin-san](https://github.com/krin-san)
[#3177](https://github.com/realm/SwiftLint/pull/3177) [#3177](https://github.com/realm/SwiftLint/pull/3177)

View File

@ -18,15 +18,9 @@ private struct FileCache: Codable {
/// A persisted cache for storing and retrieving linter results. /// A persisted cache for storing and retrieving linter results.
public final class LinterCache { public final class LinterCache {
#if canImport(Darwin) || compiler(>=5.1.0)
private typealias Encoder = PropertyListEncoder private typealias Encoder = PropertyListEncoder
private typealias Decoder = PropertyListDecoder private typealias Decoder = PropertyListDecoder
private static let fileExtension = "plist" private static let fileExtension = "plist"
#else
private typealias Encoder = JSONEncoder
private typealias Decoder = JSONDecoder
private static let fileExtension = "json"
#endif
private typealias Cache = [String: FileCache] private typealias Cache = [String: FileCache]

View File

@ -25,7 +25,7 @@ class CompilerProtocolInitRuleTests: XCTestCase {
} }
// https://bugs.swift.org/browse/SR-11501 // https://bugs.swift.org/browse/SR-11501
#if compiler(<5.1) || (SWIFT_PACKAGE && os(macOS)) #if SWIFT_PACKAGE && os(macOS) && compiler(<5.2)
private enum UnwrapError: Error { private enum UnwrapError: Error {
case missingValue case missingValue
} }

View File

@ -8,8 +8,6 @@ jobs:
strategy: strategy:
maxParallel: 10 maxParallel: 10
matrix: matrix:
swift50:
containerImage: swift:5.0
swift51: swift51:
containerImage: swift:5.1 containerImage: swift:5.1
# https://bugs.swift.org/browse/SR-12500 # https://bugs.swift.org/browse/SR-12500