diff --git a/Sources/XCLinting/XCLinter.swift b/Sources/XCLinting/XCLinter.swift index d592ccc..9c61c07 100644 --- a/Sources/XCLinting/XCLinter.swift +++ b/Sources/XCLinting/XCLinter.swift @@ -48,7 +48,7 @@ extension XCLinter.Environment { throw XCLintError.noProjectFileSpecified } - let url = URL(filePath: projectPath) + let url = URL(fileURLWithPath: projectPath) let xcodeproj = try XcodeProj(pathString: projectPath) self.init(project: xcodeproj, projectRootURL: url, configuration: configuration) diff --git a/Sources/clitool/main.swift b/Sources/clitool/main.swift index bd16d8f..70786f9 100644 --- a/Sources/clitool/main.swift +++ b/Sources/clitool/main.swift @@ -33,7 +33,7 @@ struct XCLintCommand: ParsableCommand { } // find the effective environment - let config = try resolvedConfiguration(projectRootURL: URL(filePath: projPath)) + let config = try resolvedConfiguration(projectRootURL: URL(fileURLWithPath: projPath)) let env = try XCLinter.Environment(projectPath: projPath, configuration: config) let linter = XCLinter(environment: env) @@ -67,7 +67,7 @@ extension XCLintCommand { private func resolvedConfigFileURL(projectRootURL: URL) -> URL? { if let path = configFilePath { - return URL(filePath: path, directoryHint: .notDirectory) + return URL(fileURLWithPath: path, isDirectory: false) } let defaultURL = projectRootURL.deletingLastPathComponent().appending(component: ".xclint.yml") diff --git a/Tests/XCLintTests/EmbeddedBuildSettingsRuleTests.swift b/Tests/XCLintTests/EmbeddedBuildSettingsRuleTests.swift index ba4e300..615df7a 100644 --- a/Tests/XCLintTests/EmbeddedBuildSettingsRuleTests.swift +++ b/Tests/XCLintTests/EmbeddedBuildSettingsRuleTests.swift @@ -26,7 +26,7 @@ final class EmbeddedBuildSettingsRuleTests: XCTestCase { let env = XCLinter.Environment( project: project, - projectRootURL: URL(filePath: "/dev/null"), + projectRootURL: URL(fileURLWithPath: "/dev/null"), configuration: Configuration() ) @@ -44,7 +44,7 @@ final class EmbeddedBuildSettingsRuleTests: XCTestCase { let env = XCLinter.Environment( project: project, - projectRootURL: URL(filePath: "/dev/null"), + projectRootURL: URL(fileURLWithPath: "/dev/null"), configuration: Configuration() )