美文网首页
Swift Lint 静态分析代码

Swift Lint 静态分析代码

作者: 码农淏 | 来源:发表于2020-04-13 15:17 被阅读0次

1、
全局下载https://github.com/realm/SwiftLint/releases安装
或者 pod 安装

pod 'SwiftLint'

2、添加运行脚本(Run Script Phase)
打开项目,project->Targets->Bulid Phases->加号->New Run Script Phase


image.png

3、添加脚本
全局安装脚本:

if which swiftlint >/dev/null; then
  swiftlint
else
  echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi

pod 安装脚本

"${PODS_ROOT}/SwiftLint/swiftlint"

相关文章

网友评论

      本文标题:Swift Lint 静态分析代码

      本文链接:https://www.haomeiwen.com/subject/aaogmhtx.html