Skip to content

Instantly share code, notes, and snippets.

@pupboss
Created August 11, 2017 06:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pupboss/2de3a7d691bc822b2e118f0f257a971b to your computer and use it in GitHub Desktop.
Save pupboss/2de3a7d691bc822b2e118f0f257a971b to your computer and use it in GitHub Desktop.
Script integrating OCLint into XCode. Put it in "Run script" build phase.
source ~/.bash_profile
cd ${SRCROOT}
xcodebuild -scheme <projectName> -workspace <projectName>.xcworkspace clean
xcodebuild -scheme <projectName> -workspace <projectName>.xcworkspace | xcpretty -r json-compilation-database --output compile_commands.json
oclint-json-compilation-database -exclude Pods -exclude build -exclude Internal -exclude ThirdParties -- -report-type xcode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment