Skip to content

Instantly share code, notes, and snippets.

@amleszk
Created May 27, 2015 21:57
Show Gist options
  • Save amleszk/6a63eb22634d01ee4459 to your computer and use it in GitHub Desktop.
Save amleszk/6a63eb22634d01ee4459 to your computer and use it in GitHub Desktop.
Hinge scan-build wrapper
#!/bin/sh
# run_scan_build.sh
# Hinge
#
# Created by al on 27/05/2015.
# Copyright (c) 2015 Hinge, Inc. All rights reserved.
CLANG_CHECK="Xcode"
XCODE_COMPILER_LOCATION="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
OUTPUT_LOCATION="$LOCAL_ARTIFACTS_RELATIVE_PATH/reports/scan-build"
echo "Saving reports in $OUTPUT_LOCATION"
mkdir -p "$OUTPUT_LOCATION"
scan-build -k -v -v \
--use-analyzer "${CLANG_CHECK}" \
--use-cc "$XCODE_GCC_HOME" \
-o "$OUTPUT_LOCATION" \
xcodebuild clean build -workspace "Hinge.xcworkspace" -scheme "Hinge"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment