From 268c6e27277dcf67c8f5c10b75b1f85460ef87d1 Mon Sep 17 00:00:00 2001 From: Eric Marchand Date: Wed, 17 Jan 2018 09:11:31 +0100 Subject: [PATCH] swiftlint: fix colon violation --- Sources/FileProtection.swift | 2 +- Sources/Path.swift | 4 ++-- Sources/TextFile.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/FileProtection.swift b/Sources/FileProtection.swift index b497074..e7aac84 100644 --- a/Sources/FileProtection.swift +++ b/Sources/FileProtection.swift @@ -121,7 +121,7 @@ extension Path { /// public func createFile(_ fileProtection: FileProtection) throws { let manager = FileManager() - let attributes: [FileAttributeKey : Any] = [.protectionKey: fileProtection] // todo test + let attributes: [FileAttributeKey: Any] = [.protectionKey: fileProtection] // todo test if !manager.createFile(atPath: _safeRawValue, contents: nil, attributes: attributes) { throw FileKitError.createFileFail(path: self) diff --git a/Sources/Path.swift b/Sources/Path.swift index 263eacd..61de950 100644 --- a/Sources/Path.swift +++ b/Sources/Path.swift @@ -822,14 +822,14 @@ extension Path { /// Returns the path's attributes. /// /// this method does not follow links. - public var attributes: [FileAttributeKey : Any] { + public var attributes: [FileAttributeKey: Any] { return (try? _fmWraper.fileManager.attributesOfItem(atPath: _safeRawValue)) ?? [:] } /// Modify attributes /// /// this method does not follow links. - fileprivate func _setAttributes(_ attributes: [FileAttributeKey : Any]) throws { + fileprivate func _setAttributes(_ attributes: [FileAttributeKey: Any]) throws { do { try _fmWraper.fileManager.setAttributes(attributes, ofItemAtPath: self._safeRawValue) } catch { diff --git a/Sources/TextFile.swift b/Sources/TextFile.swift index 2cd9311..b9b00f9 100644 --- a/Sources/TextFile.swift +++ b/Sources/TextFile.swift @@ -244,7 +244,7 @@ open class TextFileStreamReader: TextFileStream { } // Implement `SequenceType` for `TextFileStreamReader` -extension TextFileStreamReader : Sequence { +extension TextFileStreamReader: Sequence { /// - Returns: An iterator to be used for iterating over a `TextFileStreamReader` object. public func makeIterator() -> AnyIterator { return AnyIterator {