Fix swiftlint issues.

This commit is contained in:
Marek Fořt 2020-03-03 20:05:02 +01:00
parent 9cf408bd4f
commit 8222372ece
5 changed files with 4 additions and 8 deletions

View File

@ -44,7 +44,6 @@ enum InitCommandError: FatalError, Equatable {
}
}
// swiftlint:disable:next type_body_length
class InitCommand: NSObject, Command {
// MARK: - Attributes

View File

@ -24,7 +24,6 @@ enum ScaffoldCommandError: FatalError, Equatable {
}
}
// swiftlint:disable:next type_body_length
class ScaffoldCommand: NSObject, Command {
// MARK: - Attributes

View File

@ -29,7 +29,7 @@ public final class ProjectDescriptionHelpersBuilder: ProjectDescriptionHelpersBu
/// - cacheDirectory: Path to the cache directory.
/// - helpersDirectoryLocating: Instance to locate the helpers directory.
public init(cacheDirectory: AbsolutePath = Environment.shared.projectDescriptionHelpersCacheDirectory,
helpersDirectoryLocator: HelpersDirectoryLocating = HelpersDirectoryLocator()) {
helpersDirectoryLocator: HelpersDirectoryLocating = HelpersDirectoryLocator()) {
self.cacheDirectory = cacheDirectory
self.helpersDirectoryLocator = helpersDirectoryLocator
}

View File

@ -64,6 +64,4 @@ public final class TemplatesDirectoryLocator: TemplatesDirectoryLocating {
let customTemplates = try customTemplatesDirectory.map(FileHandler.shared.contentsOfDirectory) ?? []
return (templates + customTemplates).filter(FileHandler.shared.isFolder)
}
}

View File

@ -3,11 +3,11 @@ import Foundation
import TuistTemplate
public final class MockTemplateGenerator: TemplateGenerating {
public var generateStub: ((AbsolutePath, AbsolutePath, [String]) throws -> ())?
public var generateStub: ((AbsolutePath, AbsolutePath, [String]) throws -> Void)?
public func generate(at path: AbsolutePath,
to destinationPath: AbsolutePath,
attributes: [String]) throws {
to destinationPath: AbsolutePath,
attributes: [String]) throws {
try generateStub?(path, path, attributes)
}
}