Skip to content
This repository was archived by the owner on Aug 24, 2019. It is now read-only.

Commit

Permalink
Added back xctools to required (mandatory for OCLint)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilles Grousset committed Dec 16, 2015
1 parent 8001e89 commit 292b129
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Binary packages will be available soon...
- a Mac with Xcode
- [SonarQube](http://docs.codehaus.org/display/SONAR/Setup+and+Upgrade) and [SonarQube Runner](http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+SonarQube+Runner) installed ([HomeBrew](http://brew.sh) installed and ```brew install sonar-runner```)
- [xcpretty](https://github.com/supermarin/xcpretty) (```gem install xcpretty```)
- [xctool](https://github.com/facebook/xctool) ([HomeBrew](http://brew.sh) installed and ```brew install xctool```). If you are using Xcode 6, make sure to update xctool (```brew upgrade xctool```) to a version > 0.2.2.
- [OCLint](http://docs.oclint.org/en/dev/intro/installation.html) installed. Version 0.10.1 recommended.
- [gcovr](http://gcovr.com) installed for legacy (pre Xcode 7 coverage)
- [slather](https://github.com/venmo/slather) with profdata support (see instructions below) for Xcode 7 and above.
Expand Down
10 changes: 8 additions & 2 deletions src/main/shell/run-sonar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#

# Global parameters
XCTOOL_CMD=xctool
SLATHER_CMD=slather
XCPRETTY_CMD=xcpretty

Expand Down Expand Up @@ -159,9 +160,9 @@ fi
workspaceFile=''; readParameter workspaceFile 'sonar.objectivec.workspace'
projectFile=''; readParameter projectFile 'sonar.objectivec.project'
if [[ "$workspaceFile" != "" ]] ; then
xctoolCmdPrefix="xctool -workspace $workspaceFile -sdk iphonesimulator ARCHS=i386 VALID_ARCHS=i386 CURRENT_ARCH=i386 ONLY_ACTIVE_ARCH=NO"
xctoolCmdPrefix="$XCTOOL_CMD -workspace $workspaceFile -sdk iphonesimulator ARCHS=i386 VALID_ARCHS=i386 CURRENT_ARCH=i386 ONLY_ACTIVE_ARCH=NO"
else
xctoolCmdPrefix="xctool -project $projectFile -sdk iphonesimulator ARCHS=i386 VALID_ARCHS=i386 CURRENT_ARCH=i386 ONLY_ACTIVE_ARCH=NO"
xctoolCmdPrefix="$XCTOOL_CMD -project $projectFile -sdk iphonesimulator ARCHS=i386 VALID_ARCHS=i386 CURRENT_ARCH=i386 ONLY_ACTIVE_ARCH=NO"
fi

# Count projects
Expand Down Expand Up @@ -232,6 +233,11 @@ fi
rm -rf sonar-reports
mkdir sonar-reports

# Extracting project information needed later
echo -n 'Extracting Xcode project information'
runCommand /dev/stdout $xctoolCmdPrefix -scheme "$appScheme" clean
runCommand /dev/stdout $xctoolCmdPrefix -scheme "$appScheme" -reporter plain -reporter json-compilation-database:compile_commands.json build

# Unit tests and coverage
if [ "$testScheme" = "" ]; then
echo 'Skipping tests as no test scheme has been provided!'
Expand Down

0 comments on commit 292b129

Please sign in to comment.