Using OCLint in Xcode
来源:互联网 发布:2017年黄金周旅游数据 编辑:程序博客网 时间:2024/06/05 07:07
原文链接:http://docs.oclint.org/en/stable/guide/xcode.html#
非常详细的文章,能够在xcode中看到不规范代码提示,方便简洁,感谢作者。
Using OCLint in Xcode¶
This document shows one solution of using OCLint to analyze the code quality of a Xcode project.
Prerequisite¶
- oclint-xcodebuild Manual
- Apple’s official xcodebuild Manual Page
- Using OCLint with xcodebuild
or
- Using OCLint with xctool
or
- Using OCLint with xcpretty
Background¶
This idea was originally posted in this blog. We hope to share it with more developers, and hope to motivate more ideas.
Setting up Target¶
- Add a new target in the project, and choose
Aggregate
as the template.
- Name the new target, here we simply call it “OCLint”, you could have more than one targets that focus on different aspects of the code analysis.
- Add a new build phase in the target we just created. Choose
Add Run Script
for the phase type.
- In the script editor, we could enter the script which does the real work. We can also modify the script from this very generic version and its folks. We may need to change the
xcodebuild
options to use a particular scheme or target. In addition, based on the discussions we had, we can decide whether to useclean
anddry run
features. - For
xctool
users, the script can be largely simplified to something like this. - For
xcpretty
users, the script is also much simplier, check it out from this gist.
Running Analysis¶
- Choose the correct build scheme, here we choose
OCLint
.
- Click to build, or use the shortcut
Command+B
. - When the progress bar scrolls to the very right, the analysis is done, then we can check out the analysis results same as compile warnings.
0 0
- Using OCLint in Xcode
- Using GIT In Xcode
- Using Breakpoints in Xcode
- Some tips in using Xcode
- Using openCV for Mac OS in XCode
- Using a static library in Xcode
- USING VECTOR IMAGES IN XCODE 6
- ignoring UserInterfaceState.xcuserstate and Breakpoints_v2.xcbkptlist in Xcode, using SVN
- Working with UITableView in Xcode 5 Using Storyboard
- Using Open Source Static Libraries in Xcode 4
- 在xcode中使用OCLint做代码审查
- 让XCode自动CodeReview你的代码-OCLint使用
- [OCLint]OCLint 介绍
- [OCLint]OCLint安装
- [OCLint]OCLint教程
- [OCLint] oclint-xcodebuild 使用手册
- Simple iOS 5 UI Design Tutorial Using Storyboard in XCode 4
- Xcode cannot run using the selected device.Choose a destination with a supported architecture in ord
- LeetCode之路:521. Longest Uncommom Subsequence I
- eclipse的安装和汉化
- POJ 2342 Anniversary party (听说这是树形DP)
- Android事件分发机制(一)
- Struts2基础
- Using OCLint in Xcode
- 环信ChatDemoHelper中didReceiveMessages无法接收消息!
- hibernate数据库和类的映射
- ReactNative ES6简介 及基本语法第一篇
- 数据库
- 查看所有设备树节点名称
- Python中的异常栈跟踪
- Eclipse
- openssl 生成自签名证书 并配置ssl