Skip to content

Instantly share code, notes, and snippets.

@sprohaszka
Created February 7, 2013 11:13
Show Gist options
  • Save sprohaszka/4730349 to your computer and use it in GitHub Desktop.
Save sprohaszka/4730349 to your computer and use it in GitHub Desktop.
Simple OCLint script
#!/bin/bash
if [ $# -lt 2 ]; then
echo "OCLint generate by default a report.html files with all rules violation"
echo "This script requires that oclint, oclint-xcodebuild and ocline-json-compilation-database can be reached from your PATH"
echo "Usage $0 <workspace> <scheme>"
exit 0
fi
xcodebuild -workspace $1 -sdk iphonesimulator6.1 -scheme $2 clean build | tee xcodebuild.log
oclint-xcodebuild
oclint-json-compilation-database -v -- -html -o report.html
# Clean generated files
rm compile_commands.json
rm xcodebuild.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment