新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
iOScodeview-創(chuàng)新互聯(lián)
1.環(huán)境配置
文章名稱:iOScodeview-創(chuàng)新互聯(lián)
本文網(wǎng)址:http://fisionsoft.com.cn/article/hppgg.html

oclint:http://oclint.org/
xcpretty:https://github.com/supermarin/xcpretty
使用Mac安裝xcpretty過程可能會出現(xiàn)自帶ruby版本錯(cuò)誤,需要升級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會提示出錯(cuò)“OSError: [Errno 7] Argument list too long”
https://github.com/oclint/oclint/issues/233有網(wǎng)友給出解決方案:https://github.com/wuwen1030/oclint_argument_list_too_long_solution/tree/master
3.oclint默認(rèn)的rule
http://docs.oclint.org/en/stable/howto/thresholds.html
文章名稱:iOScodeview-創(chuàng)新互聯(lián)
本文網(wǎng)址:http://fisionsoft.com.cn/article/hppgg.html