SwiftLint/Source/swiftlint/Commands/VersionCommand.swift

14 lines
354 B
Swift

import Commandant
import Result
import SwiftLintFramework
struct VersionCommand: CommandProtocol {
let verb = "version"
let function = "Display the current version of SwiftLint"
func run(_ options: NoOptions<CommandantError<()>>) -> Result<(), CommandantError<()>> {
print(Version.current.value)
return .success(())
}
}