Skip to content

Instantly share code, notes, and snippets.

@JesusMartinAlonso
Forked from ManWithBear/OCLint.sh
Created November 21, 2016 15:00
Show Gist options
  • Save JesusMartinAlonso/2798142550680313806d2af180ac7d28 to your computer and use it in GitHub Desktop.
Save JesusMartinAlonso/2798142550680313806d2af180ac7d28 to your computer and use it in GitHub Desktop.
OCLint script for xcode
if [ -f ~/.bash_profile ]; then
source ~/.bash_profile
fi
hash oclint &> /dev/null
if [ $? -eq 1 ]; then
echo >&2 "oclint not found, analyzing stopped"
exit 1
fi
cd ${SRCROOT}
xcodebuild -target <Put here target> -configuration <Debug|Release> -scheme <Put here scheme> -dry-run | xcpretty -r json-compilation-database
oclint-json-compilation-database -- -report-type xcode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment