mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
ObjCBool is no longer implicitly converted to Bool on Linux
This commit is contained in:
@@ -54,7 +54,7 @@ extension Configuration {
|
||||
}
|
||||
|
||||
let isDirectory: Bool
|
||||
#if os(Linux)
|
||||
#if os(Linux) && (!swift(>=4.1) || (!swift(>=4.0) && swift(>=3.3)))
|
||||
isDirectory = isDirectoryObjC
|
||||
#else
|
||||
isDirectory = isDirectoryObjC.boolValue
|
||||
|
||||
@@ -86,7 +86,7 @@ extension String {
|
||||
internal var isFile: Bool {
|
||||
var isDirectoryObjC: ObjCBool = false
|
||||
if FileManager.default.fileExists(atPath: self, isDirectory: &isDirectoryObjC) {
|
||||
#if os(Linux)
|
||||
#if os(Linux) && (!swift(>=4.1) || (!swift(>=4.0) && swift(>=3.3)))
|
||||
return !isDirectoryObjC
|
||||
#else
|
||||
return !isDirectoryObjC.boolValue
|
||||
|
||||
@@ -264,7 +264,7 @@ private extension String {
|
||||
func isDirectory() -> Bool {
|
||||
var isDir: ObjCBool = false
|
||||
if FileManager.default.fileExists(atPath: self, isDirectory: &isDir) {
|
||||
#if os(Linux)
|
||||
#if os(Linux) && (!swift(>=4.1) || (!swift(>=4.0) && swift(>=3.3)))
|
||||
return isDir
|
||||
#else
|
||||
return isDir.boolValue
|
||||
|
||||
Reference in New Issue
Block a user