Skip to content

Commit 22bdffe

Browse files
committed
Update template to accommodate recent changes in target struct
1 parent 5d473ba commit 22bdffe

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tools/Version.swift.template

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
/// A type describing the SwiftLint version.
2-
public struct Version {
2+
public struct Version: VersionComparable {
33
/// The string value for this version.
44
public let value: String
55

6+
/// An alias for `value` required for protocol conformance.
7+
public var rawValue: String {
8+
value
9+
}
10+
611
/// The current SwiftLint version.
7-
public static let current = Version(value: "__VERSION__")
12+
public static let current = Self(value: "__VERSION__")
13+
14+
/// Public initializer.
15+
///
16+
/// - parameter value: The string value for this version.
17+
public init(value: String) {
18+
self.value = value
19+
}
820
}

0 commit comments

Comments
 (0)