首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >KingFisher 5.12.0的链接错误- Swift 5.1.2

KingFisher 5.12.0的链接错误- Swift 5.1.2
EN

Stack Overflow用户
提问于 2019-12-22 05:18:03
回答 1查看 266关注 0票数 0

当我在项目中的Kingfisher库上运行swiftlint时,我得到了以下错误。我运行的是Swift 5.1.2 XCode 11.2.1

代码语言:javascript
复制
Testing failed:
    Consecutive statements on a line must be separated by ';'
    Expected expression
    Consecutive statements on a line must be separated by ';'
    Expected expression
    Consecutive statements on a line must be separated by ';'
    Expected expression
    Consecutive statements on a line must be separated by ';'
    Expected expression
    Consecutive statements on a line must be separated by ';'
    Expected expression
    Consecutive statements on a line must be separated by ';'
    Expected expression
    Consecutive statements on a line must be separated by ';'
    Expected expression
    Cannot convert value of type '() -> ImageDownloader' to expected argument type '((_, SessionDelegate.SessionChallengeFunc) -> Void)?' (aka 'Optional<(_, (URLSession, URLAuthenticationChallenge, (URLSession.AuthChallengeDisposition, Optional<URLCredential>) -> ())) -> ()>')
    Cannot convert value of type '() -> ImageDownloader' to expected argument type '((_, SessionDelegate.SessionTaskChallengeFunc) -> Void)?' (aka 'Optional<(_, (URLSession, URLSessionTask, URLAuthenticationChallenge, (URLSession.AuthChallengeDisposition, Optional<URLCredential>) -> ())) -> ()>')
    Cannot convert value of type '() -> ImageDownloader' to expected argument type '((_, Int) -> Bool)?'
    Cannot convert value of type '() -> ()' to expected argument type '((_, (URL, Result<URLResponse, KingfisherError>)) -> Void)?'
    Use of unresolved identifier 'task'
    Use of unresolved identifier 'task'
    Unable to infer complex closure return type; add explicit type to disambiguate
    Cannot convert value of type '() -> ()' to expected argument type '((_, (Result<(Data, URLResponse?), KingfisherError>, [SessionDataTask.TaskCallback])) -> Void)?'
    Expected ',' separator
    Consecutive statements on a line must be separated by ';'
    Consecutive statements on a line must be separated by ';'
    Expected expression
    Cannot convert value of type '() -> ()' to expected argument type '((_, (SessionDataTask.CancelToken, SessionDataTask.TaskCallback)) -> Void)?' (aka 'Optional<(_, (Int, SessionDataTask.TaskCallback)) -> ()>')
    Command MergeSwiftModule failed with a nonzero exit code
    Insufficient indentation of next 2 lines in multi-line string literal
    Command CompileSwift failed with a nonzero exit code
    Testing cancelled because the build failed.

我试过下面的方法: swift run swiftformat。swiftlint自动更正

但是没有骰子,我已经把它装成了一个cocoapod。在我打开翠鸟项目本身的问题之前,我在这里问。

EN

回答 1

Stack Overflow用户

发布于 2020-03-09 23:19:05

当swiftFormat的脚本自动更正翠鸟pod时,我遇到了一个非常类似的问题。您需要手动(或通过pod deintegrate)删除pod,重新安装它(以逆转更改),然后,如果您像我一样,在构建阶段将swiftlint作为脚本调用,请将其更改为

代码语言:javascript
复制
"${PODS_ROOT}/SwiftFormat/CommandLineTool/swiftformat" . --exclude Pods,Generated
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59439911

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档