Files
SideStore/Sources/Cargo/swiftlint/Commands/SwiftLint.swift
2023-03-10 19:30:09 -05:00

27 lines
780 B
Swift

import ArgumentParser
import Foundation
@main
struct SwiftLint: AsyncParsableCommand {
static let configuration: CommandConfiguration = {
if let directory = ProcessInfo.processInfo.environment["BUILD_WORKSPACE_DIRECTORY"] {
FileManager.default.changeCurrentDirectoryPath(directory)
}
return CommandConfiguration(
commandName: "swiftlint",
abstract: "A tool to enforce Swift style and conventions.",
version: Version.value,
subcommands: [
Analyze.self,
Docs.self,
GenerateDocs.self,
Lint.self,
Rules.self,
Version.self
],
defaultSubcommand: Lint.self
)
}()
}