diff --git a/CHANGELOG.md b/CHANGELOG.md index 2932920fb..16fdb7420 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ #### Breaking -* None. +* SwiftLint now requires Swift 5.1 or higher to build. + [JP Simard](https://github.com/jpsim) #### Experimental @@ -10,7 +11,8 @@ #### 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) [#3177](https://github.com/realm/SwiftLint/pull/3177) diff --git a/Source/SwiftLintFramework/Models/LinterCache.swift b/Source/SwiftLintFramework/Models/LinterCache.swift index 4f7cde94a..fccfe5b64 100644 --- a/Source/SwiftLintFramework/Models/LinterCache.swift +++ b/Source/SwiftLintFramework/Models/LinterCache.swift @@ -18,15 +18,9 @@ private struct FileCache: Codable { /// A persisted cache for storing and retrieving linter results. public final class LinterCache { -#if canImport(Darwin) || compiler(>=5.1.0) private typealias Encoder = PropertyListEncoder private typealias Decoder = PropertyListDecoder 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] diff --git a/Tests/SwiftLintFrameworkTests/CompilerProtocolInitRuleTests.swift b/Tests/SwiftLintFrameworkTests/CompilerProtocolInitRuleTests.swift index f9f5227f6..9b181ca52 100644 --- a/Tests/SwiftLintFrameworkTests/CompilerProtocolInitRuleTests.swift +++ b/Tests/SwiftLintFrameworkTests/CompilerProtocolInitRuleTests.swift @@ -25,7 +25,7 @@ class CompilerProtocolInitRuleTests: XCTestCase { } // 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 { case missingValue } diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c9cf2b500..7a5398757 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,8 +8,6 @@ jobs: strategy: maxParallel: 10 matrix: - swift50: - containerImage: swift:5.0 swift51: containerImage: swift:5.1 # https://bugs.swift.org/browse/SR-12500