OCLint

安装

1
2
3
4
brew tap oclint/formulae

brew install oclint

更新

1
2
3
4
brew update

brew upgrade oclint

bash_profile 里添加

1
2
OCLINT_HOME=/path/to/oclint-release
export PATH=$OCLINT_HOME/bin:$PATH

xcodebuild -scheme TrainIOS -workspace TrainIOS.xcworkspace clean && xcodebuild -scheme TrainIOS -workspace TrainIOS.xcworkspace -configuration Debug | xcpretty -r json-compilation-database -o compile_commands.json

oclint-json-compilation-database -e Pods – -report-type html -o oclintReport.html