首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OCLint用法示例

OCLint用法示例
EN

Stack Overflow用户
提问于 2012-11-16 01:21:28
回答 1查看 5.5K关注 0票数 2

我正在寻找一个关于如何配置OCLint或如何使其运行的示例。我找了一遍,但一无所获。在Stack Overflow上只有3篇相关的帖子,只是命名了这个库,在谷歌上只有官方的OCLint.org

官方文件说:

代码语言:javascript
复制
[user@localhost ~]$ oclint -help
OVERVIEW: OCLint, a static code analysis tool for Objective-C and related languages

USAGE: oclint [options] <input files>

OPTIONS:
  -D <macro>               - Predefine the specified macro
  -F <directory>           - Add directory to framework include search path
  -I <directory>           - Add directory to include search path
  -R <directory>           - Add directory to rule loading path
  -arch <arch_name>        - Specify which architecture (e.g. ppc, i386, x86_64, armv7) the compilation 
                             should targets.
  -help                    - Display available options (-help-hidden for more)
  -include <file>          - Include file before parsing
  -isysroot <directory>    - Add directory to SYSTEM include search path
  -o <file>                - Write output to <file>
  -rc <paramemter>=<value> - Change the baheviour of rules
  -stats                   - Enable statistics output from program
  Choose report type:
    -text                  - Plain text report
    -html                  - HTML formatted report
  -version                 - Display the version of this program
  -x <value>               - Input language type

但是我想要一个关于宏(-D)的更好的解释,以及为-I,-F,-R选择哪条路径,以及我应该指出什么。代码示例如下

代码语言:javascript
复制
$ oclint path/to/file.m -D something -I something -F something -R something

而预期的输出将是巨大的。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-01-12 07:27:54

基本上,你只需要给oclint你给你编译器的任何东西。

或者,如果您不熟悉编译器标志,可以尝试使用oclint-xcodebuild。这是一个从Xcode构建日志文件中提取标志的Python脚本。请参阅用法here

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13402854

复制
相关文章

相似问题

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