-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update template to accommodate recent changes in target struct
- Loading branch information
1 parent
5d473ba
commit 22bdffe
Showing
1 changed file
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
/// A type describing the SwiftLint version. | ||
public struct Version { | ||
public struct Version: VersionComparable { | ||
/// The string value for this version. | ||
public let value: String | ||
|
||
/// An alias for `value` required for protocol conformance. | ||
public var rawValue: String { | ||
value | ||
} | ||
|
||
/// The current SwiftLint version. | ||
public static let current = Version(value: "__VERSION__") | ||
public static let current = Self(value: "__VERSION__") | ||
|
||
/// Public initializer. | ||
/// | ||
/// - parameter value: The string value for this version. | ||
public init(value: String) { | ||
self.value = value | ||
} | ||
} |