-
-
Save tylermilner/287e9eb60dc8bc6b9da77760b16b6c98 to your computer and use it in GitHub Desktop.
Script integrating OCLint into Xcode 10. Put it in "Run script" build phase of aggregate target (see http://docs.oclint.org/en/stable/guide/xcode.html). Replace "<project_name>" and tweak "exclude" flags as necessary.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/.bash_profile | |
unset LLVM_TARGET_TRIPLE_SUFFIX | |
xcodebuild -scheme <project_name> -workspace <project_name>.xcworkspace clean | |
xcodebuild -scheme <project_name> -workspace <project_name>.xcworkspace COMPILER_INDEX_STORE_ENABLE=NO | xcpretty -r json-compilation-database --output compile_commands.json | |
maxPriority=15000 | |
oclint-json-compilation-database -exclude Pods -exclude build -- -report-type xcode -max-priority-1=$maxPriority -max-priority-2=$maxPriority -max-priority-3=$maxPriority |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment