From d5be0a91f83dd78261a0c41916682a1297df3263 Mon Sep 17 00:00:00 2001 From: Daniele Margutti Date: Wed, 18 Jul 2018 09:37:14 +0200 Subject: [PATCH] #559 Fixed Codable compiling issue on Swift 4.2, Added identifier_name rule in SwiftLint --- .swiftlint.yml | 1 + Sources/SwiftDate/DateInRegion/DateInRegion.swift | 2 +- Sources/SwiftDate/DateInRegion/Region.swift | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index 6b9f58a3..94b5e956 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -5,6 +5,7 @@ disabled_rules: # rule identifiers to exclude from running - multiple_closures_with_trailing_closure - xctfail_message - vertical_parameter_alignment + - identifier_name # Swift 3 rules that do not make sense for Swift 2.3 - implicit_getter diff --git a/Sources/SwiftDate/DateInRegion/DateInRegion.swift b/Sources/SwiftDate/DateInRegion/DateInRegion.swift index e6ce522d..b3deb605 100644 --- a/Sources/SwiftDate/DateInRegion/DateInRegion.swift +++ b/Sources/SwiftDate/DateInRegion/DateInRegion.swift @@ -8,7 +8,7 @@ import Foundation -public struct DateInRegion: DateRepresentable, Codable, CustomStringConvertible, Comparable, Hashable { +public struct DateInRegion: DateRepresentable, Decodable, CustomStringConvertible, Comparable, Hashable { /// Absolute date represented. This date is not associated with any timezone or calendar /// but represent the absolute number of seconds since Jan 1, 2001 at 00:00:00 UTC. diff --git a/Sources/SwiftDate/DateInRegion/Region.swift b/Sources/SwiftDate/DateInRegion/Region.swift index 0375a447..c7681d07 100644 --- a/Sources/SwiftDate/DateInRegion/Region.swift +++ b/Sources/SwiftDate/DateInRegion/Region.swift @@ -10,7 +10,7 @@ import Foundation /// Region define a context both for `Date` and `DateInRegion`. /// Each `Date` is assigned to the currently set `SwiftDate.default -public struct Region: Codable, Equatable, Hashable, CustomStringConvertible { +public struct Region: Decodable, Equatable, Hashable, CustomStringConvertible { // MARK: - Properties