oclint:http://oclint.org/
xcpretty:https://github.com/supermarin/xcpretty
使用Mac安装xcpretty过程可能会出现自带ruby版本错误,需要升级ruby
$ curl -L get.rvm.io | bash -s stable $ source ~/.rvm/scripts/rvm $ rvm list known $ rvm install 2.2.0 rvm use 2.2.0 --default2.代码扫描
xcodebuild clean build -sdk iphonesimulator -arch "x86_64" ONLY_ACTIVE_ARCH=NO VALID_ARCHS="i386 x86_64" | xcpretty -r json-compilation-database cp build/reports/compilation_db.json compile_commands.json oclint-json-compilation-database -e Pods -- -rc=LONG_LINE=200 -rc=NCSS_METHOD=100 -o=report.html如果扫描的生成的compile_commands.json文件过大,oclint-json-compilation-database会提示出错“OSError: [Errno 7] Argument list too long”
https://github.com/oclint/oclint/issues/233有网友给出解决方案:https://github.com/wuwen1030/oclint_argument_list_too_long_solution/tree/master
3.oclint默认的rule
http://docs.oclint.org/en/stable/howto/thresholds.html
分享文章:iOScodeview-创新互联
分享链接:https://www.cdcxhl.com/article16/hppgg.html
成都网站建设公司_创新互联,为您提供品牌网站建设、外贸建站、搜索引擎优化、网站维护、网站设计公司、定制开发
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联