You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How OCLint is installed: local build? prebuilt binary downloaded from github? homebrew install? others?
downloaded frome guthub.
Reproduction Steps
1,I downloaded the OCLint source code form Git,
2,I used the ./make command builded zhe OCLInt project
3,I created a custom rule , I move the custome rule's dylib to rule paths, It can run.
3,but I want debug zhe rule in xcode,How to do?
now I can debug oclint and rules in xcode IDE.
step1. used the cmake tool, create xcode project with each module
step2. ensure each project compile complete
step3.create a workspace, and content the all xcode project
step4.整理好每个project的依赖关系,特别是要oclint依赖你自己的rule,便于开发调试
step5.xcode中选择oclint-0.12scheme,edit scheme,添加运行参数如下(注意有些路径要改为自己的路径)
Activity
litianying137 commentedon Aug 1, 2017
now I can debug oclint and rules in xcode IDE.
step1. used the cmake tool, create xcode project with each module
step2. ensure each project compile complete
step3.create a workspace, and content the all xcode project
step4.整理好每个project的依赖关系,特别是要oclint依赖你自己的rule,便于开发调试
step5.xcode中选择oclint-0.12scheme,edit scheme,添加运行参数如下(注意有些路径要改为自己的路径)
step6.开始开心用xcode的开发rule吧
silan-liu commentedon Nov 27, 2017
有demo吗, -p是什么命令需要的
iphone-andy commentedon Dec 7, 2017
@litianying137 我这能跑起来,但是在分析的时候报错了,
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:17:10: 'stdarg.h' file not found
你有遇到过么、silan-liu commentedon Dec 7, 2017
@iphone-andy 你是按他的方法来的吗
silan-liu commentedon Dec 7, 2017
@iphone-andy 报错,需要添加clang的include路径。
-isystem /Users/liu/Documents/workspace/my/opensource/oclint/build/oclint-release/lib/clang/5.0.0/include
iphone-andy commentedon Dec 8, 2017
@silan-liu 是的,你可以debug么,这个我加了,还是报错,我的参数是这样的
-p /Users/qiucaning/Desktop/testCode/CoreText /Users/qiucanqing/Desktop/testCode/CoreText/CoreText/ViewController.m -- -isystem /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include -iframework /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks -isystem /Users/qiucaning/Desktop/BaiLi/oclint/build/oclint-release/lib/clang/5.0.0/include
silan-liu commentedon Dec 8, 2017
@iphone-andy 嗯我是可以了。只不过我跟他的命令有点不同,直接用的
-R=/Users/liusilan/Documents/workspace/code/3rd/oclint/oclint-xcoderules/rules.dl/Debug TestObject.m -- -x objective-c,之前也是跟你一样的错,后来加了clang的include就好了。
iphone-andy commentedon Dec 8, 2017
@silan-liu 是的-R参数我也加了,你TestObject.m使用了系统库么,我这报错
UIKit/UIKit.h' file not found
iphone-andy commentedon Dec 8, 2017
最后试验可以debug,参数如下,-p是oclint的运行参数,指定文件目录,后跟要分析的文件名称,eg : -p ~/test ViewController.m ,-R指定要加载的规则,感谢各位
-R=/Users/qiucanqing/Desktop/BaiLi/oclint/oclint-xcoderules/rules.dl/Debug ViewController.m -- -x objective-c -isystem /Users/qiucanqing/Desktop/BaiLi/oclint/build/oclint-release/lib/clang/5.0.0/include -iframework /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks -isystem /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include
yangshengtao commentedon Jan 30, 2018
@silan-liu TestObject.m怎么写的
silan-liu commentedon Feb 1, 2018
就是在另外一个工程里面建的TestObject的类,跟平常的oc一样。