【问题标题】:What's the difference between 'pod spec lint' and 'pod lib lint'?“pod spec lint”和“pod lib lint”有什么区别?
【发布时间】:2015-08-31 05:20:21
【问题描述】:

Cocoapods 提供了两个 lint 命令,spec lintlib lint。它们之间到底有什么不同,分别在什么场景下使用?

我阅读了文档(speclib),但我找不到它们之间的区别,我不明白为什么 Cocoapods 为同一事物提供了两个命令。

【问题讨论】:

    标签: cocoapods


    【解决方案1】:

    TL;DR:pod lib lint = 本地,pod spec lint = 本地/远程


    您提到您已阅读文档,但仍不清楚。我会尽量让它更清楚:

    pod lib lint
    

    将在本地 lint 您的 pod,并确保您正确提供了所有内容来创建您的 pod。但是验证您的 pod 是不够的,只有 pod spec lint 会。

    pod spec lint
    

    会在任何地方lint 您的 pod。我的意思是,你可以将你的 pod 源代码放在 GitHub 上,例如,它将lint。如果 pod spec lint 返回没有错误,您可以将 linted pod 推送到 Cocoapods。

    【讨论】:

    • 这是否意味着pod spec lint 涵盖了pod lib lint 的所有测试?并且pod spec lint 更严格地测试 pod?
    • 是的,pod spec lint 是针对库测试 pod 规范的终极方法。在将代码推送到 github 之前,我使用了 pod lib lint,但现在我只使用了 pod spec lint,你也应该使用
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-10-02
    • 1970-01-01
    • 2015-11-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-29
    相关资源
    最近更新 更多