infer 编译代码审查命令记录

本文介绍了Infer静态分析工具的使用方法,包括iOS项目的xcodebuild配置与执行过程、Android项目的编译流程及Java项目的Maven编译指令。通过这些步骤,开发者可以有效地进行代码错误检测。

infer -- xcodebuild -target <target name> -configuration <build configuration> -sdk iphonesimulator


/Users/walkerjiang/Desktop/infer/infer-osx-v0.4.0/infer/bin/infer

xcodebuild clean -sdk iphonesimulator9.0 -configuration Debug


/Users/walkerjiang/Desktop/infer/infer-osx-v0.4.0/infer/bin/infer -- xcodebuild -sdk iphonesimulator9.0 -configuration Debug


/Users/walkerjiang/Desktop/infer/infer-osx-v0.4.0/infer/bin/inferTraceBugs


xcodebuild -workspace 项目根目录/项目名.xcworkspace -scheme 项目名 ONLY_ACTIVE_ARCH=NO TARGETED_DEVICE_FAMILY=1 DEPLOYMENT_LOCATION=YES


xcodebuild -workspace LHand.xcworkspace -scheme LHand ONLY_ACTIVE_ARCH=NO TARGETED_DEVICE_FAMILY=1 DEPLOYMENT_LOCATION=YES


xcodebuild clean -sdk iphonesimulator9.0 -configuration Debug

 


xcodebuild -workspace LHand.xcworkspace -scheme LHand ONLY_ACTIVE_ARCH=NO TARGETED_DEVICE_FAMILY=1 DEPLOYMENT_LOCATION=YES -configuration Debug

xcodebuild -workspace LHand.xcworkspace -scheme LHand ONLY_ACTIVE_ARCH=NO -configuration Debug


//
xcodebuild -workspace LHand.xcworkspace -scheme LHand -sdk iphonesimulator

/Users/walkerjiang/Desktop/infer/infer-osx-v0.4.0/infer/bin/infer -- xcodebuild -workspace LHand.xcworkspace -scheme LHand -sdk iphonesimulator


//android infer 查看过程
1. cd android/ZHand 目录
android update project -p . -t android-20
2. cd android/libary 目录
android update project -p . -t android-2
3. cd android/ZHand 目录
infer -- ant debug
4. 最后去 infer-out 查看最终结果

 

 

//java 项目的编译过程
infer -- mvn compile -Dmaven.test.skip=true -f ../pom-smart.xml
infer -- mvn compile -Dmaven.test.skip=true -f ../pom-im.xml (no bugs)
infer -- mvn compile -Dmaven.test.skip=true -f ../pom-manage.xml
infer -- mvn compile -Dmaven.test.skip=true -f ../pom-map.xml (no bugs)
infer -- mvn compile -Dmaven.test.skip=true -f ../pom-msg.xml (no bugs)
infer -- mvn compile -Dmaven.test.skip=true -f ../pom-office.xml (no bugs)
infer -- mvn compile -Dmaven.test.skip=true -f ../pom-schedule.xml
infer -- mvn compile -Dmaven.test.skip=true -f ../pom-storage.xml
infer -- mvn compile -Dmaven.test.skip=true -f ../pom-wap.xml (no bugs)

转载于:https://www.cnblogs.com/jhj117/p/5345140.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值