Created
March 7, 2013 01:32
-
-
Save guehara/5104833 to your computer and use it in GitHub Desktop.
xcodebuild statis analyzer
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
#!/bin/sh | |
LATEST_VER=`xcodebuild -showsdks |sed -n -e 's/^.*sdk iphonesimulator\([0-9.]\{1,\}[^\n]\)$/\1/p'|sort|sed -n '$p'` | |
BUILD_CONFIG="Debug" | |
BUILD_OPTS="clean build" | |
OUTPUT_DIR="reports" | |
ANALYZE_OPTS="RUN_CLANG_STATIC_ANALYZER=YES CLANG_ANALYZER_OUTPUT=plist-html CLANG_ANALYZER_OUTPUT_DIR=${OUTPUT_DIR}" | |
if [ "$1" == ""]; then | |
exit | |
fi | |
TARGET = $1 | |
# 古い解析結果を削除 | |
if [ -d $OUTPUT_DIR ]; then | |
rm -rf $OUTPUT_DIR | |
fi | |
xcodebuild -target $TARGET -configuration $BUILD_CONFIG -sdk iphonesimulator$LATEST_VAR $ANALYZE_OPTS $BUILD_OPTS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment